A simple HTML-related question

Source: Internet
Author: User
Weak weak question: a simple HTML question has been entangled in the past few days. although it has no impact, I still remember: Code & lt; ulclass = & quot; userlist & quot; & gt; & nbsp; & lt; listyle = & quot; width: 86px; weak: ask a simple HTML question
In the past few days, I have been entangled in a problem. although it has no effect, I still remember:
Code





Style
. Userlist {display: block; padding: 0; margin: 0; overflow: hidden; border: 1px solid red ;}
. Userlist li {float: left; display: block; border: 1px solid red ;}
. Userlist p {display: block; float: left; width: 10px; height: 10px; overflow: hidden; border: 1px solid red ;}

Such a simple code !!! Why can't my p tag reach the top of li but in the middle ?????

------ Solution --------------------
The p element is an old product. give up on it.

In the impression, mozilla's block elements are vertically centered.

I haven't written html for a long time, so I forget it.
------ Solution --------------------
* {Padding: 0; margin: 0;} taught ....

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.