Two column list layout based on data-* attribute - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

Two column list layout based on data-* attribute

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">

[data-list="general_results"] {
   float:right;
   clear:right;
}


      </style> 
 </head> <!--  www  .ja  v  a 2 s . c  o  m-->
 <body> 
  <div id="twoColumn"> 
   <ul> 
    <li data-list="general_results">general text1</li> 
    <li data-list="general_results">general text2</li> 
    <li data-list="general_results">general text3</li> 
    <li data-list="category_results">category text1</li> 
    <li data-list="category_results">category text2</li> 
    <li data-list="category_results">category text3</li> 
    <li data-list="category_results">category text4</li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials