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 ....