I made a draft website to learn html, but I noticed that on smaller screens, margin-right: auto
doesn't work.
Same with the <center>
tag.
I would give the code, but it's pretty big, so I'll just explain what I did:
I put everything in a table and used colspan
for more tidyness.
Everything is in a very big div.
The div has width 65%, margin-left:auto
and margin-right:auto
.
It works perfectly on my pc, but not on smaller screen ones, like laptops. It just appears in the far right, like margin-right
is not even there. If I remove margin-left
, it goes to the left too much.
I also don't want to measure it in pixels, because it varies from resolution to resolution (right?).
How can I make it work?