Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Newb Q. Sidebars etc XHTML/CSS

Discussion in 'Website Design Forum:' started by allyally2k, Dec 30, 2009.

  1. allyally2k

    allyally2k Senior Member

    If I want a sidebar which will have some sort of pattern on, but no text (purely decoration). How do you set the height so it is as long as it needs to be?! :confused:
  2. Greg

    Greg Active Member

    to the sidebar div in your CSS? and then use a large background image or a smaller one repeated on x or y axis...
  3. Aarlev

    Aarlev Member

    Does that not only work if the parent element has a fixed height? And how do you get 100% height working in IE6 Greg? I remember fiddling with this ages ago and could never get it to work.

    I usually have my columns contained inside a DIV, and then just put the tiling background image on the y-axis of that DIV so all columns will look as if they have equal height.
  4. Greg

    Greg Active Member

    Yeah think you're right Soren, as for allowing the sidebar to stretch to the height it needs to be, then not specifying a height in the CSS would do it, would it not? Then just setup padding/spacing, and the width as needed and the content should push the div as high as it needs to be if that makes any sense?
  5. tbwcf

    tbwcf Active Member

    you could position it absolutely....

    {position:absolute; top:0; bottom:0; left:0;/*or right*/ width:200px; background:url(images/yourimage.png);}

    When positioning absolute you can specify 3 values (top/right/bottom/left) so you can make the div stick to the top/bottom of the screen without needing to specify a height. If you need any help let me know...
  6. allyally2k

    allyally2k Senior Member

    Thanks guys, Tbwcf that worked thank you!!

Share This Page