Wednesday, June 16, 2010

div width relative positioning scrollbar

Another 45 minutes (or so) gone.

if you create a div style="position: relative; top: 0px; left: 536px;">
someamazingtext

The browser will create a verticalscrollbar. No matter how short the text is.
Reason: a div without specified width is 100% the length of the document no matter where it starts on the left of things.

width:auto; won't help you.


No comments:

Post a Comment