views:

20

answers:

2

I have a CSS div which contains text (basically, it's a headline). I have another CSS div that I want to have smaller sized text and to sit right to the right of the first, larger-texted div. I'm not sure how to do this...how do I tell the second div to place itself against the right of the first when each instance of the first div could be various lengths? Is there anyway to do this so that the second, smaller-texted div would be butted up against the first and would be relative to the first's length?

Thanks a ton for any help!

+1  A: 
div{
  display:inline-block;
}
marcgg
Nice! That worked perfectly and was so simple, it required no explanation. Thanks!
JToland
@jtoland: you're welcome ^^
marcgg
+1  A: 
div.headline
{
    float:left;
}

div.details
{
    float:left;
}

div.clear
{
    clear:both;
}

Use in HTML:

<div class="heading">Heading</div>
<div class="details">Details</div>
<div class="clear"></div>

Hope this helps.

Evan Mulawski