Jump to content

Expand float


The Little Guy

Recommended Posts

I have two columns, column one is 250px, and I want column 2 to expand to the edge of its parent container, which is the width of the screen. How can I do this using the float property?

 

CSS:

.container{
    float:left;
    width:100%;
}
.left{
float:left;
width:250px;
border:solid 2px #004C7C;
background-color: #FFF;
margin-right: 10px;
}
.content{
float:left;
display:block;
}

 

HTML:

<div class="container">
<div class="left"></div>
<div class="content"></div>
</div>

Link to comment
https://forums.phpfreaks.com/topic/202342-expand-float/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.