Home >Web Front-end >CSS Tutorial >Use ul+li to implement thin line tables
This article mainly introduces how to use the thin line table effect achieved with ul li without using a table. Friends who are very creative and interested can learn about it.
The code is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>write by 阿会楠 环境:IE7+IE6</title> <style type="text/css"> #ulDate{ width:404px; margin:0; border-top:1px solid #cccccc; border-left:1px solid #cccccc; } #ulDate li{ float:left; width:100px; height:30px; list-style-type:none; border-right:1px solid #cccccc; border-bottom:1px solid #cccccc; /*非必须*/ line-height:30px; font-size:12px; text-align:center; } </style> </head> <body> <ul id="ulDate"> <li style="width:403px;background:#F7F7FF;text-align:center;">时间</li> <li>2008-7-30</li> <li>2008-7-30</li> <li>2008-7-30</li> <li>2008-7-30</li> <li>2008-7-30</li> <li>2008-7-30</li> <li>2008-7-30</li> <li>2008-7-30</li> <li>2008-7-30</li> <li>2008-7-30</li> <li></li> <li></li> </ul> </body> </html>
Related recommendations:
htmlHow to make a thin line table
Sample code to create a thin line table using the border-collapse:collapse attribute in css
CSS implements a thin line table_html/css_WEB-ITnose
The above is the detailed content of Use ul+li to implement thin line tables. For more information, please follow other related articles on the PHP Chinese website!