CSS field-word layout

Source: Internet
Author: User

<style type= "Text/css" >
*{margin:0; padding:0; list-style:none;}
. nav{max-width:960px; overflow:hidden; margin:0 auto; border:5px solid #F60; padding:10px;}
. Nav ul{margin:-10px 0 0-10px; list-style:none; padding:0;}
. Nav li{width:25%; float:left;}
. Nav li a{color: #fff; display:block; background: #F60; line-height:30px; margin:10px 0 0 10px; text-align:center; font-siz e:12px; Text-decoration:none; }
. Nav Li a:hover{background: #F00}

@media (max-width:480px) {
. nav{padding:5px;}
. Nav ul{margin:-5px 0 0-5px;}

. Nav li{width:50%;}
. Nav Li a{margin:5px 0 0 5px;}

<div class= "NAV" >
<li><a href= "#" > Home </a></li>
<li><a href= "#" > About Us </a></li>
<li><a href= "#" > News Center </a></li>
<li><a href= "#" > Contact Us </a></li>
<li><a href= "#" > Home </a></li>
<li><a href= "#" > About Us </a></li>
<li><a href= "#" > News Center </a></li>
<li><a href= "#" > Contact Us </a></li>

not going to the meeting, just a process!  

This article is from the "Happy and simple" blog, make sure to keep this source http://1120173856.blog.51cto.com/2882946/1638861

CSS field-word layout

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.