...

View Full Version : Making sidebar the same length of page



ole90
07-31-2007, 04:06 PM
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.

i.e.

| Z
| Z
| Z
| Z
Z
Z
Z

| = 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.

VIPStephan
07-31-2007, 05:29 PM
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 (http://www.alistapart.com/articles/fauxcolumns/) method.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum