Reputation: 218942
I have this HTML in my page
<div id='masterDIV'>
<div id='divItemNumber'>23</div>
<div id='divDesc'>This is my desc content</div>
</div>
and my Style
.divItemNumber
{
width:25px;
margin-left:0px;
margin-bottom:5px;
}
.divDesc
{
width:255px;
float:right;
padding-left:1px;
padding-right:1px;
margin-left:0px;
margin-bottom:5px;
margin-top:0px;
vertical-align:top;
}
But the second div is coming as the next line. I want this to be displayed adjucent right after the first div (divITemNumber)
This problem comes in IE 6.0 only .in firefox its rendering properly
Can any one help me ?
Upvotes: 1
Views: 2629
Reputation: 187110
One problem is that your CSS selector is not correct.
You have to use
#divDesc
instead of
.divDesc
to select the div with id divDesc
Read
Upvotes: 4
Reputation: 76021
I would suggest changing you CSS so that the first div is float: left
and the second is normal.
Alternatively, changing the first div from a block type element to an inline type element (display: inline
) should fix the problem.
Upvotes: 0