[CLUE-Tech] Using CSS to get an HTML table effect.

David Anselmi anselmi at americanisp.net
Tue Oct 28 21:44:08 MST 2003


Paul Bille wrote:

> Jed > "column 1 has a different background color from the body, and is the
> full height . . ."
> 
> Jed,
> 
> If I understand your objective is to have the sidebar color run the full
> length of the page on the left side, this code should work with Netscape
> 7.1.  I have a greenish bar running the full length of the page when I view
> this HTML code snippet using Netscape 7.1.
> 
> The code DOES NOT WORK for IE 6.0.  IE shows the bar only extending the
> range of the text in the block.  That's a pain. Let me know what it looks
> like to you.

If you change the height in .sidebar from inherit to some number of 
pixels it will work in both Mozilla and IE.  But you'd want more pixels 
than you expect your right side to be and that might make your page 
scrollable when there's no reason for it.  Play around and see what happens.

You can also try enclosing both divs in another div and see how its 
properties change the flow.  Can be tricky.

Although CSS2 may be poorly implemented, I don't think that's a reason 
to avoid it.  Just test what you do on your target browsers.

I also don't think it's useful to use browser detection javascript.  If 
you're carefull with your CSS you can get something that works on both 
IE and Mozilla the same way.  But I'm not terribly constrained by time 
or layout so I'm not as sensitive as some might be.

Dave





More information about the clue-tech mailing list