the 2 first must be floating leftwards and the other to the rightmost but only the middle one appears because it's the only one that has content.
CSS
Code: Select all
<style type="text/css">
body{
color:#ffffff;
}
#select
{
width:300px;
height:70px;
cursor:pointer;
background-color:yellow;
}
.select-left
{
float:left;
background-color:red;
width:5px;
}
.select-middle
{
float:left;
background-color:blue;
width:auto;
}
.select-right
{
float:right;
background-color:green;
}
</style>Code: Select all
<div id="select">
<div class="select-left"></div>
<div class="select-middle">Option Value</div>
<div class="select-right"></div>
</div>