First of all, I'd like to apologise if this question is too simple to justify asking here, I'm extremely inexperienced when it comes to web design/development.
I'm trying to get these links to span the entire width of the nav bar, while still making room for the elements on each side, both of which have different widths.
Setting any width anywhere in my code to 100% doesn't do this, however taking the table out of the navbar works fine.
Here's my code.
header {
position: fixed;
width: 100%;
height: 2.5em;
background-color: #202020;
}
#top-spacer {
height: 2.5em;
width: 100%;
}
#logo {
width: auto;
height: 2.5em;
}
#nav-container {
display: inline-block;
max-width: 100%;
}
nav {
display: block;
width: 100%;
background-color: blue;
height: 0.5em;
vertical-align: top;
padding: 0;
margin: 0 auto;
}
nav table {
display: inline-block;
width: 100%;
}
#menu-button {
display: inline-block;
width: auto;
height: 2.5em;
float: right;
opacity: 0.3;
transition: opacity 1s;
}
#menu-button:hover {
opacity: 1;
}
<html lang=en>
<head>
<meta charset="utf-8">
<meta name="Description" content="describey mcscriberson">
<meta name="keywords" content="a,b,c,d">
<link rel="stylesheet" href="css/normalize.css" type="text/css">
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body>
<header>
<img src="img/logo.png" id="logo">
<div id="nav-container">
<nav>
<table width="100%">
<tr>
<td>link</td>
<td>link</td>
<td>link</td>
<td>link</td>
<td>link</td>
<td>link</td>
</tr>
</table>
</nav>
</div>
<img src="img/menu.png" id="menu-button">
</header>
<div id="top-spacer"></div>
</body>
</html>
Thank you.