[thelist] pros and cons of absolute positioning in css
Kasimir K
evolt at kasimir-k.fi
Thu Feb 24 07:39:21 CST 2005
>>The other solution is not at all ugly: use ems for sizing and
>>positioning the text containers - try enlarging the text, and the
>>containers grow too.
> But you can't use it in absolute layouts because you can't enlarge
> some boxes: they might overlap other boxes. The box sizes are fixed,
> whether in pixels or in percentages.
In the following example the boxes won't overlap each other when text
size is changed:
div#box1
{
position: absolute;
top: 1em;
left: 1em;
width: 5em;
}
div#box2
{
position: absolute;
top: 1em;
left: 6em;
}
If you mix px and em, then you have overlapping problems. If you stick
to one or another - no problems. And if the one you stick to is em, then
you have text containers scaling together with text.
.k
More information about the thelist
mailing list