Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
07-31-2007, 05:06 PM #1
- Join Date
- Jan 2007
- Thanked 0 Times in 0 Posts
Making sidebar the same length of page
Hey i was wondering how to make sure that my sidebar is always the same length of my page. See, i have a script which takes all rows from a database and sometimes, there are so many rows that it makes the page even longer than the sidebar which is set at a precised amount of pixels.
| = sidebar
Z = content
lol. ok, not the best example. But do you see what i mean. The content strolls off the page, i was wondering how to make sure the sidebar is always the same side of the page, and stretch if the content becomes bigger.
07-31-2007, 06:29 PM #2
- Join Date
- Jan 2006
- Halle (Saale), Germany
- Thanked 1,040 Times in 1,013 Posts
So, how is your HTML looking like? Usually a two column layout consits of two divs, at least one of which is floated (the first one in the source code). Now if that’s the case you would apply a margin to the other column as much as the sidebar is wide so the content doesn’t wrap around that sidebar, and then you would “fake” the length by using the faux column method.