tags:

views:

113

answers:

3

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 ?

+1  A: 

Add this to your CSS div classes:

display: inline;
Cam Soper
A: 

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.

Franci Penov
+3  A: 

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

ID selectors

rahul