Responsive DL and DT layouts - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Responsive DL and DT layouts

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
dl {<!-- w w  w .  j  a  v a 2s .  co  m-->
   margin:0px;
   padding:0px;
   background-color:Chartreuse;
   overflow:auto;
}

dt {
   float:left;
   width:31%;
   text-align:right;
   background-color:yellow;
   white-space:nowrap;
}

dd {
   width:71%;
   float:left;
   background-color:blue;
   white-space:nowrap;
}
</style> 
 </head> 
 <body> 
  <dl> 
   <dt>
     Lorem i 
   </dt> 
   <dd>
     Lorem i 
   </dd> 
   <dt>
     Lorem ipsum dolor 
   </dt> 
   <dd>
     Lorem i 
   </dd> 
   <dt>
     Lorem ipsum dolor sit amet, consectetur adi 
   </dt> 
   <dd>
     Lorem ipsum dolor sit amet, consectetur adipiscing eli 
   </dd> 
  </dl>  
 </body>
</html>

Related Tutorials