CSS Tutorial Website Production News list method

Source: Internet
Author: User

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.

Related Article

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.