Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tominated

macrumors 68000
Original poster
Jul 7, 2006
1,723
0
Queensland, Australia
I have a problem with the template I am making ( http://tominatedsoftware.com/tigris/ ) where when the content is long enough to make it scroll, the scroll bars push some things out of alignment. Is there a way with javascript or something to see if a div's content is larger than the div and apply a css style to another element so it doesn't misalign when it needs a scrollbar. Hope you understand.... and reply.
BTW: the scrollbar is put there by the "overflow: auto;" css property
 
You could always show the scrollbar... not an ideal solution, but since those scrollbars are one of (many) things different browsers implement differently, things will be pushed around in some of them when one is placed via auto.
 
You could always show the scrollbar... not an ideal solution, but since those scrollbars are one of (many) things different browsers implement differently, things will be pushed around in some of them when one is placed via auto.

That would also be my suggestion....certainly going to be easier than the alternatives.
 
align the stuff from the LEFT of the scrollable area and allow about 25px free space. if there is no scrollbar, you will just see extra blue space on the right.
 
You have more problems that just that.

The amount of people on here who produce CSS layouts which are completely inflexible as soon as the text size changes is staggering.
 

Attachments

  • Picture 2.png
    Picture 2.png
    42.2 KB · Views: 95
  • Picture 3.png
    Picture 3.png
    36.1 KB · Views: 87
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.