CSS to make table effects

Source: Internet
Author: User
CSS from: http://www.tbrown.org/ideas/tabularlist/
The principle is very simple, is to use the UL Li such list element, the horizontal display data, also does not have the new idea, because it's this model is very practical.
Xhtml:<div id= "Byitem" >

<ul class= "Vert" >
<li class= "TableHeader" >
<ul class= "Horz" >
<li>item #</li>
<li class= "Name" >Name</li>
<li>Color</li>
<li>in stock?</li>
<li class= "Price" >Price</li>
</ul>
</li>
<li>
<ul class= "Horz" >
<li>8476292163</li>
<li class= "name" >cheese widget</li>
<li>Green</li>
<li>Yes</li>
<li class= "Price" >$3.14</li>
</ul>
</li>
</ul>
</div>css:/* Widgets America (by Item)
------------------------------------*/
Div#byitem Ul.vert {
List-style-type:none;
padding:0;
margin:0;
width:540px;
}
Div#byitem Ul.vert Li {
PADDING:4PX 0;
margin:0;
height:14px; /* Spaces out your rows * *
}
Div#byitem Ul.vert li.odd {
Background-color: #eee;
}
Div#byitem Ul.horz {
Clear:left;
List-style-type:none;
padding:0;
margin:0;
}
Div#byitem Ul.horz Li {
Float:left;
width:80px;
padding:0 20px 0 0;
margin:0;
}
Div#byitem Ul.horz Li.name {/* size your columns individually at the expense of»
Slightly bloated markup (labelling each appropriate <li> with this class) * *
width:130px;
}
Div#byitem Ul.horz Li.price {
Text-align:right;
padding-right:0;
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.