#Related to CSS actually

3 messages · Page 1 of 1 (latest)

regal pike
#

So I want this main division to have a 40% width, but if I just give width: 40%, then it will just maintain a 40% width forever, and will not shrink when I zoom the page out... How do I do it so that it has a 40% width of the page initially, but I can still zoom in or zoom out ?

#

For now I'm using
width: 700px;

But I've heard that using pixels is a bad idea since it makes your page appears differently on different devices, depending on their resolution, which makes sense

regal pike
#

Figured it out by trial and error:
Turns out I have to give a min-width and max-width in order to make it zoom in and out.

Thanks !