Jump to content

height 100%, need help


Lamez

Recommended Posts

I want to make a box as high as it can go without over lapping the footer, or header. I also want the text to automatically do a line break in IE and FF, but I could only get this to work in IE, here is my CSS:

div.leftbox{
word-wrap: break-word;
overflow: hidden;
float: left;
width: 20%;
height: auto;
border: #0099CC solid 1px;
background-color: #FFFFFF;
}

 

here is a pic, I want the the white box to touch the green parts (header and footer) and automatically stretch when the hight increases.

box.bmp

 

-Thanks Guys!

Link to comment
Share on other sites

Something like this for the style sheet:

 


#leftcolumn {
width:20%;
}

#textbox{
word-wrap: break-word;
overflow: hidden;
height: auto;
border: #0099CC solid 1px;
background-color: #FFFFFF;
}

#header {
background-color:#009900;
border: #0099CC solid 1px;
}

#footer {
background-color:#009900;
border: #0099CC solid 1px;
}

 

And the html like this:

 


<body>
<div id='leftcolumn'>

<div id='header'>
Header.
</div>

<div id='textbox'>
This is a load of text.
</p>
Blah blah blah
</div>

<div id='footer'>
Footer.
</div>
</div>	

</body>

 

...ought to solve it.  The text box will change size automatically depending on how much you put in it as long as you don't specify a size eg height: 50px;

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.