Link to home
Start Free TrialLog in
Avatar of John Carney
John CarneyFlag for United States of America

asked on

How do I align two divs next to each other rather than one on top of the other?

I would like to have the div "descriptionShort" directly to the right of "conditions", and top aligned with it. Please correct either the hTML or CSS, or both, to make that happen.  As it is now, "descriptionShort" is coming in below "conditions", and left-aligned.

Also, in "descriiptionShort", is it possible to have a line height 22px between the first lines 1 and 2, and a height of 14px for the other 3 lines?

Thanks!
John
HTML CODE:
      <div id="conditions">Condition:<br />
          Product(s): 
      </div>     
      <div id="descriptionShort">New<br />
      1 White JBL Radial High-Performance Loudspeaker Dock for iPod JBLRADIALWHT </div>
        
CSS CODE:
#conditions {
	font-family: "Gill Sans MT";
	font-size: 14px;
	margin-top: 40px;
	float: none;
	padding-top: 0px;
	width: 70px;
	height: 50px;
	color: #333333;
}
#descriptionShort {
	font-family: "Gill Sans MT";
	font-size: 14px;
	margin-top: 0px;
	float: left;
	padding-top: 0px;
	width: 250px;
	height: 50px;
	color: #333333;
}

Open in new window

Avatar of vb_jonas
vb_jonas
Flag of Sweden image

change
float: none;
to
float: left;

for #conditions.
ASKER CERTIFIED SOLUTION
Avatar of rbudj
rbudj
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of John Carney

ASKER

Thanks, rbudj ...