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

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -