Jump to content

[SOLVED] how to make div the full height of the screen


M.O.S. Studios

Recommended Posts

here is the problem,

<div class='left'> and <div class='right'>

are placed next to each other within <div class='center'>

<div class='right'> is the content and the height varies from page to page

i want the length of <div class='left'> to always match <div class='right'>

 

any one have any ideas?

 

the css

.center {
width:900px;
background-color: #FFFFFF;
text-align: left;
vertical-align: top;
        border: 1px solid #000000;
}

.left{
float: left;
width: 20%;
background-color: #ffffff;
}
.right{
float: right;
width: 80%;
background-color: #ffffff;
text-align: left;
vertical-align: top;
}

 

the html

<div class='center'>
<div class='left'><div>
<div class='right'></div>
</div>

 

Thanks in advance

Link to comment
Share on other sites

that didn't work, i figured it out.

 

css

.center {
width:900px;
background-color: #FFFFFF;
text-align: left;
vertical-align: top;
        border: 1px solid #000000;
}

.left{
float: left;
width: 100%;
background-color: #ffffff;
}
.right{
float: right;
width: 80%;
background-color: #ffffff;
text-align: left;
vertical-align: top;
}

 

html

<div class='center'>
        <div class='left'>

        <div class='right'></div>
        </div>
</div>

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.