Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2007
    Posts
    217
    Thanks
    9
    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.

    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.

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,706
    Thanks
    6
    Thanked 1,011 Times in 984 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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •