Css Getting Started Tutorial: how to control li div labels without line breaks

Source: Internet
Author: User

Css Getting Started Tutorial: how to control li div labels without line breaks. Well, in the css document layout, many things can be used and many details are worth studying, let's take a look at how I use css to control li div.

Index | aboutme | company | product

Let's look at the navigation bar above, from left to right. Of course we can also define a title directly, but this tutorial will talk about using li or div for control, let's take a look at the above code.

<Div id = nav>
<Li> index </li>

<Li> aboutme </li>

<Li> company </li>

<Li> product </li>
</Div>

The code we see is like this. Of course, if you use div, you can change li to div. The key is how to define them. Let's look at the css code.

# Nav li {float: left; width: 80px}

In this way, our effect will come out, and the div should be in the same way.

Finally, I declare that the original site is reprinted with www.111cn.net/cssdiv/css.html

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.