html - CSS Image not touching top -
I'm creating a navigation bar is horizontal and touches both the sizes of the screen is only a problem that the top does not touch (as you can see yellow rectangle does not touch on the top) I had it I'm in CSS:
html, body {margin: 0; Padding: 0; }
HTML code:
& lt; Div id = "nav" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "/ test" & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt;
What am I doing?
Your & lt; Ul & gt;
Display is set as: block; by default. You are looking at the break of the line that comes before it. You eat it as a margin-top in your CSS: -10px;
Comments
Post a Comment