Line Text with Nav Bar in HTML
Posted
by
Eric
on Stack Overflow
See other posts from Stack Overflow
or by Eric
Published on 2012-04-08T17:25:32Z
Indexed on
2012/04/08
17:28 UTC
Read the original article
Hit count: 423
I have a navbar right under the title to the site, but I want to be line up the first and last items in the navbar with the beginning and end of the Title. I don't have a live preview, but I attached an image. I can get it to line up in one browser, but when I open it in the other, its off again. Is there an easy way to line the text up so it works for everything? thank you
HTML:
<body onload="play()">
<div class="heading">UPRISING</div>
<div class="container_12">
<div id="topnav" align="center">
<ul id="list-nav">
<li><a href="home.html">HOME</a></li>
<li><a href="about.html">ABOUT</a></li>
<li><a href="trailer.html">TRAILER</a></li>
<li><a href="stills.html">STILLS</a></li>
<li><a href="news.html">NEWS</a></li>
<li><a href="contact.html">CONTACT</a></li>
<!-- <li><a href="distribution.html">DISTRIBUTION</a></li> -->
</ul>
</div>
<!-- START OF CONTAINER -->
<div class="trailer">
<img id="imgHolder" />
</div>
</div> <!-- END OF CONTAINER 12 -->
CSS:
#topnav li {
margin-right: 110px;
}
#topnav li:nth-last-child(1) {
margin-right: 0px;
}
© Stack Overflow or respective owner