Psionicsin
11-09-2011, 01:15 PM
Hey guys!
I'm trying to style my navigation menu using HTML5 tags and references only. The hard part, however, is wrapping my head around how to translate the old way of navigation styling to the newer way of doing it. Example:
Old Styling Syntax:
<nav>
<ul>
<li></li>
...etc...
</ul>
</nav>
New Styling Syntax:
<nav>
<a href="#">TEXT</a>
</nav>
Although I know that it's perfectly acceptable to use a "ul" inside of the "nav" element, I don't want to. Needless to say that because of that I'm having a couple issues that I can't quite figure out.
How do I place my navigation text on 2 lines?
Where ("nav" or "nav a") do I place my line-height and other "li" info?
Is giving the menu links a set width and height as simple as just declaring them when used in this context?
How do I place my links at the bottom of the "nav" element container (margin did nothing for me)?
My code thus far:
<nav>
<a href="#">OUR COMPANY</a>
<a href="#">OUR WINES</a>
<a href="#">FOOD PAIRINGS</a>
<a href="#">SHOP ONLINE</a>
<a href="#">CONTACT US</a>
</nav>
nav {
width: 960px;
height: 90px;
text-align: center;
background: #552d97 url('images/bg-nav.png') no-repeat center top;
margin: 0;
padding: 0;
}
nav a {
color: #000000;
background: #ffffff;
text-decoration: none;
margin: 0px;
padding: 13px 13px;
}
I'm trying to style my navigation menu using HTML5 tags and references only. The hard part, however, is wrapping my head around how to translate the old way of navigation styling to the newer way of doing it. Example:
Old Styling Syntax:
<nav>
<ul>
<li></li>
...etc...
</ul>
</nav>
New Styling Syntax:
<nav>
<a href="#">TEXT</a>
</nav>
Although I know that it's perfectly acceptable to use a "ul" inside of the "nav" element, I don't want to. Needless to say that because of that I'm having a couple issues that I can't quite figure out.
How do I place my navigation text on 2 lines?
Where ("nav" or "nav a") do I place my line-height and other "li" info?
Is giving the menu links a set width and height as simple as just declaring them when used in this context?
How do I place my links at the bottom of the "nav" element container (margin did nothing for me)?
My code thus far:
<nav>
<a href="#">OUR COMPANY</a>
<a href="#">OUR WINES</a>
<a href="#">FOOD PAIRINGS</a>
<a href="#">SHOP ONLINE</a>
<a href="#">CONTACT US</a>
</nav>
nav {
width: 960px;
height: 90px;
text-align: center;
background: #552d97 url('images/bg-nav.png') no-repeat center top;
margin: 0;
padding: 0;
}
nav a {
color: #000000;
background: #ffffff;
text-decoration: none;
margin: 0px;
padding: 13px 13px;
}