Hiya
This is only my second post and I am still learning the best practices of code.
Basically I found a solution to my problem but I want to know if I should usually do it this way? It has taken me a LONG time to get this to work but I couldn't find any other way to do it online/in my books (not sure what to google!)
I wanted to make a header/navigation bar that overlapped so i had one header image and then 6 navigation buttons. I couldn't get the navigation buttons to lie flush with each other so I put them in a table and then creaded a new empty table row to bring it down so it would align in the right place with the header.
I had an issue that I needed the alignment on the left to work correctly so that it fitted in the right space and this would only work when the window was on max but not when minimized. This worked when I used a cell space and
I bet there's a much easier way to do this! So any info would be very appreciated thank you
Here is the website:
www.kieronhuntdesign.com/contact
Code:
<div class="header">
<div id="top">
<a href="index.html"><img src="images/header.png" width="960" height="90" align="center"/></a>
</div>
<div class="nav">
<div id="under">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="6" height="69"></td>
</tr>
<tr>
<td width="100"> <font color="white">                        </font></td>
<td><a href="index.html"><img src="nav/homebutton.png" height="50" name="home" onMouseOver="document.home.src='nav/homebuttonmouseover.png' " onMouseOut="document.home.src='nav/homebutton.png' " /></a></td>
<td><a href="about.html"><img src="nav/aboutbutton.png" height="50" name="about" onMouseOver="document.about.src='nav/aboutbuttonmouseover.png' " onMouseOut="document.about.src='nav/aboutbutton.png' "/></a></td>
<td><a href="design.html"><img src="nav/designbuttonmouseover.png" height="50" name="design" /></a><td>
<td><a href="illustration.html"><img src="nav/illustrationbutton.png" height="50" name="illustration" onMouseOver="document.illustration.src='nav/illustrationbuttonmouseover.png' " onMouseOut="document.illustration.src='nav/illustrationbutton.png' " /></a></td>
<td><a href="photography.html"><img src="nav/photographybutton.png" height="50" name="photography" onMouseOver="document.photography.src='nav/photographybuttonmouseover.png' " onMouseOut="document.photography.src='nav/photographybutton.png' " /></a></td>
<td><a href="contact.html"><img src="nav/contactbutton.png" height="50" name="contact" onMouseOver="document.contact.src='nav/contactbuttonmouseover.png' " onMouseOut="document.contact.src='nav/contactbutton.png' " /></a></td>
</tr>
</table>
</div>
</div>
</div>
and css some of which probably isn't needed
Code:
#top {
margin-left: 0 auto;
margin-right: 0 auto;
position: absolute;
z-index: 1;
}
#under {
margin-left: 0 auto;
margin-right: 0 auto;
position: absolute;
z-index: 2;
}
#container {
clear: right;
display: inline;
padding: 0px 0px 0px 0px;
margin : 0;
margin-left:auto;
margin-right:auto;
float: center;
}