Jump to content

fill remaining space with div width


Russia

Recommended Posts

hey guys thanks for the upcoming support how do I set the blue to fill up the remaining width of the while maininfo div? I tried setting the width:auto
 

<div class="maininfo">

    <div class="large">2</div>

    <div class="smallblock">

        <div class="smalltop">3</div>

        <div class="small">4</div>

    </div>

    <div class="smallblock">

        <div class="smalltop">5</div>

        <div class="small">6</div>

    </div>

</div>
.maininfo {



    width: 600px;



}



.large {

    float: left;

    height: 95px;

    background-color: blue;

    width:auto;

}





.smallblock {

    float: right;

    height: 90px;

    margin: 0 0 0 5px;

    width: 20%;

}



.small {

background-color: red;

height: 50%;

width: 100%;

}

.smalltop {

background-color: red;

height: 50%;

width: 100%;

    margin-bottom:5px;

}

Edit fiddle - JSFiddle

 

Link to comment
https://forums.phpfreaks.com/topic/291312-fill-remaining-space-with-div-width/
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.