Web site Production News list method: Write the date in the Span tab, then write the span tag in Li, the CSS defines span (float:right), so that span floats to the right of the list.
CSS section:
Body {font-size:12px} UL {width:400px; margin:0; padding:0; List-style:none} . newslist {line-height:20px padding:5px 0; color: #333; border-bottom:1px dashed #ccc} . newslist span {color: #888; float:right; Text-align:right} A {color: #333; Text-decoration:none} a:hover {color:blue; Text-decoration:underline} |
HTML section:
<ul> <li cla ss= "Newslist" > <a href= "#" > Title </a><span> 2008-11-28 </span></li> <li class= "newslist" > <a href= "#" > Title </a><span> 2008-11-28 </sp an></li> <li class= "newslist" > <a href= "#" > Title </a>< Span> 2008-11- </span></li> <li class= "newslist" > <a href= "# "> Title </a><span> 2008-11-28 < /span></li> <li class= "newslist" > <a href= "#" > Title </a>< Span> 2008-11- </span></li> <li class= "newslist" > <a href= "# "> Title </a><span> 2008-11-28 </span></li> </ul> |
Our general Web site production practices are the <span> date </span> written on the back of the news list. In fact, we should put <span> date </span> in front of the news list.