Newb Q. Sidebars etc XHTML/CSS

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:
 
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.
 
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?
 
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...
 
Back
Top