Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS sidebar height 1

Status
Not open for further replies.

Stoemp

Programmer
Sep 25, 2002
389
BE
Hi

I'm working on a css box model lay-out for a backoffice website I'm making, but I have some problems with the height property of one of the div elements. Here's the situation:

I have 2 div blocks that contain header information (1 with the title of the page and one with additional information below the title). These blocks together have a height of 200px. Then I have 2 other blocks: A left block that contains the menu and a right big block with the real content of the page. I have given the left menu block a grey background and it would of course be prettier if the column stretches all the way to the bottom of the window. I tried setting the height of the div to 100%, but then the div takes the inner height of the window, resulting in a block that's 200px to high. Can I solve this another way?

Thanks

Steven
 
use a table and if you really need the divs, put them inside the cells. you can use the same scheme only that this time, should the table height be set to 100% and the top rows have the values you specified (together 200px) then the bottom menu should be as big as the rest of the window

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
I disagree with table usage completely. The idea of proper CSS implementation is to get away from table-d layouts.

For info on how to do what (I think) you're asking, take a look here:
*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Indeed the table layout is something I want to avoid at all cost. I used to work with tables, but I want to make my first full CSS site ;-) cLFlaVA, I will check out the site. I'm sure I'll find what I'm looking for there.

Thank you

Steven
 
Good luck - I've recently taken upon myself the task of making all my sites pure CSS and barebones HTML.

It's frustrating, but the results are well worth it.

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Don't talk to me about frustration. The website from the company I work for ( counts more than 100.000 lines of code (ASP & HTML). The code is a real mess: a mix of simple HTML markup and CSS. I don't have the courage to make the site all CSS...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top