I am new to web and css design.. I have started playing with the HTML5 element
I have created a simple horizontal <nav>
menu, but for some reason there is some padding showing above the menu stopping it from appear at the top of the page.
Here's a fiddle: http://jsfiddle.net/LmcE7/1/
HTML:
<nav class="site-nav">
<ul>
<li class=""> <a href=".html"></a>
</li>
<li class=""> <a class="" href=".html">Maps</a>
</li>
<li class=""> <a class="" href=".html">Lighting</a>
</li>
<li class=""> <a class="" href=".html">Services</a>
</li>
<li class=""> <a class="" href=".html">Contact Us</a>
</li>
</ul>
</nav>
CSS:
article, aside, figcaption, figure, footer, header, main, nav, section {
display: block;
}
body, dt, dd, h1, h2, h3, th, td {
margin: 0 auto;
padding:0;
width: 70%;
}
ul, ol {
list-style: none;
padding: 0;
}
.site-nav {
/*width: 100%;*/
height: 48px;
background: #ac0c0c; /* Old browsers */
background-image: -moz-linear-gradient(#bf0d0d, #860909); /* FF3.6+ */
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bf0d0d), color-stop(100%, #860909)); /* Chrome,Safari4+ */
background-image: -webkit-linear-gradient(#bf0d0d, #860909); /* Chrome10+,Safari5.1+ */
background-image: -o-linear-gradient(#bf0d0d, #860909);/* Opera 11.10+ */
background: -ms-linear-gradient(#bf0d0d, #860909); /* IE10+ */
background-image: linear-gradient(#bf0d0d, #860909); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bf0d0d', endColorstr='#860909',GradientType=0 ); /* IE6-8 */
text-align: center;
}
.site-nav ul {
}
.site-nav li {
display: inline;
list-style-type: none;
}
.site-nav li a {
text-align: center;
padding-right: 40px;
color: white;
}
.site-nav a:hover {
background-color: #2d8ff0;
color: white;
text-shadow: none;
}
I've also noticed the text within each menu item is not appearing in the centre of its element