CSS centered title to the side in a li - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

CSS centered title to the side in a li

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">
li.container {<!-- www .ja  v a2 s. c  o m-->
   float:left;
   border:2px solid Chartreuse;
   margin:11px;
   width:801px;
   padding:11px 0 11px;
}

span.title {
   font-size:2.4em;
   width:151px;
   margin:0 11px;
   display:block;
   float:left;
}

span.description {
   float:right;
   color:yellow;
   width:551px;
   margin:0 11px 0 0;
   display:block;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li class="container"> <span class="title">Lorem ipsum d</span> <span class="description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat<span> </span> </span> </li> 
   <li class="container"> <span class="title">Lorem ipsum d</span> <span class="description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus se<span> </span> </span> </li> 
  </ul>  
 </body>
</html>

Related Tutorials