css - dt (float left) and first dd (float right) on the same line -


i using definition list define sections of resume.

i have each dt , first dd show on same line. dt should on left, , dd on right. remaining dds each dt show below dt.

i need responsive, screen width decreases first dd goes next line.

right now, can't seem floats clear @ right point.

any ideas?

here's code: http://jsfiddle.net/wgkzp/

html:

<dl>  <dt class="position">position name 1</dt> <dd class="side-time clearfix">     <time datetime="2010-08-01" class="start">august 2010</time><span class="end">present</span> </dd> <dd class="organization first">organization name</dd> <dd>location, usa</dd> <dd class="additional">     <ul>         <li>described task 1</li>         <li>described tesk 2</li>     </ul> </dd> <dt class="position">position name 2</dt>  <dd class="side-time clearfix">     <time datetime="2010-08-01" class="start">august 2010</time><span class="end">present</span> </dd> <dd class="organization first">organization name</dd> <dd>location, usa</dd> <dd class="additional">     <ul>         <li>described task 1</li>         <li>described tesk 2</li>     </ul> </dd> <dt class="position">position name 3</dt>  <dd class="side-time clearfix">     <time datetime="2010-08-01" class="start">august 2010</time><span class="end">present</span> </dd> <dd class="organization first">organization name</dd> <dd>location, usa</dd> <dd class="additional">     <ul>         <li>described task 1</li>         <li>described tesk 2</li>     </ul> </dd> 

css:

dl {   margin: 0 0 0 20px;   overflow: hidden; }  dt {   margin-top: 10px;   float: left; }  dt.first {   margin: 0; }  dd {   margin: 0;   padding: 0; }  dd ul {   margin-bottom: 0; }  dd time, dd .end {   font-style: italic; }  dd time.start:after {   content:'\2013'; }  dd.side-time {   float: right; }  .clearfix {   *zoom: 1; }  .clearfix:before, .clearfix:after {   display: table;   content: "";   line-height: 0; }  .clearfix:after {   clear: both; } 

thanks!

dd {     clear:both; }  dt + dd{     clear: none;    } 

http://jsfiddle.net/wgkzp/1/


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -