How to make the background colour in a CSSed column stretch all the way down: use an image. Sigh. I thought the point of CSS was not having to use hacks and single-pixel gifs and all that nonsense. Though perhaps this is better.
Related
Discover more from Jill Walker Rettberg
Subscribe to get the latest posts sent to your email.
Eivind
This is probably the most annoying problem about CSS, and I often end up with wrapping the whole thing in a table, which is just terrible.
I wonder if CSS3 has anything in stock for fixing this problem..
Anders
The solution depends on the design you want. If you have two elements, a tall and a short, make the desired background colour for the short element the background colour for the whole page, and then set the background colour for the tall element specifically.
If you haven’t changed your mockup, I guess you are thinking about the blue at the bottom of the image. Make the page background blue and put the blog text in a that has a white background. I am pretty sure the blog part will always be as tall as the whole page, even if it isn’t in your mockup.
Anyway, I try to follow Jeff Veen’s HotWired principle: know your code, and make the limitations a design feature. Why do you need the column to have a single colour all the way? Isn’t there another way of getting the same effect? Check out this redesign suggestion for Jakob Nielsen’s site.
Nina Terese
Is this what you are trying to do? http://www.moronicbajebus.com/playground/cssplay/twocolumns/
Jill
Yes! This is more or it! And the solution is more or less the same as the other solutions I’ve seen, too – you seem to need that background image…
Jason
I actually ended up having to do a dual-color bg image (light gray and dark gray) while setting the bgcolor of the main content area to white. Yeah, it was tricky, and a pain (but I’m pretty sure it’s valid).
You can see what I mean if you look at my search result page, which I never really cleaned up:
http://www.wordherders.net/cgi-bin/mt/mt-search.cgi?IncludeBlogs=2&search=new+design
The third row of color (not green, not darkest gray, but the dual gray band) is actually my background image, which allows me to do the tri-color effect all the way down my main page.
Jill
Which reminds me, anyone know if there’s actually any way of making a template for the search results page in MT? My search pages seem to just choose a random style sheet from any of the blogs running on that installment, which isn’t terribly convenient.
matt
Far be it from me (whose cookie-cutter blog cuts no design ice) to carp, but on some little screens I think your infinitely long T-shirt is too costly, width-wise. Especially as one scroooolls down.