Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li>it is semantically better not to use div for menu (instead use followed by </li> <li>it's wrong to repeat many times an id (instead use classes, or combine css selectors - for your html #menu-button is the same as #menu div).</li> </ol> <p>Here the html + css corrected with the centered menu</p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;style&gt; @charset "utf-8"; html, body { margin: 0px; padding: 0px; border: 0px; font-family:Verdana, Geneva, sans-serif; background-color:#000; } #container { width: auto; margin: 0 auto; padding: 0; } #container #topcontain { margin:20px 0px 20px 0px; height:120px; border-bottom:#F90 solid 3px; } #container #topcontain #header { height:120px; background:-moz-linear-gradient(#ffe2a3, #ffc341); /* FF3.6+ */ background:-webkit-linear-gradient(#ffe2a3, #ffc341); /* Chrome,Safari4+ */ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffe2a3,endColorstr=#ffffc341); /* IE */ } #container #topcontain #header #logo { width:150px; height:117px; margin:auto; float:left; } #container #topcontain #header #title { width:auto; position:relative; margin: 0px 50px 0px 0px; height:117px; float:right; color: #900; font-size:20px; font-family:Tahoma, Geneva, sans-serif; } #container #menu { width: 100%; padding:0 auto; background:#ffc341; position:relative; overflow:hidden; } #container #menu li{ margin:0; width: 150px; position:relative; display:block; text-decoration:none; text-align:center; background:#ffc341; float:left; font-size:18px; color: #000; border-right: #F90 thin solid; } #container #menu li a:link, #container #menu li a:visited{ text-decoration:none; color:inherit; } #container #menu li:hover{ background-color: #F30; color:#fff; text-decoration: overline; } /*centered menu */ nav ul{ margin: 10px auto; width: 755px; } &lt;/style&gt; &lt;/head&gt; &lt;body &lt;div id="container"&gt; &lt;div id="topcontain"&gt; &lt;div id="header"&gt; &lt;div id="logo"&gt; Logo Here &lt;/div&gt; &lt;div id="title"&gt; &lt;h1&gt; THE TITLE HERE&lt;/h1&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;nav id="menu"&gt; &lt;ul&gt; &lt;li&gt; &lt;a href="#"&gt; HOME &lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#"&gt; PRODUCTS &lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#"&gt; GALLERY &lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#"&gt; INFO &lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#"&gt; ABOUT US &lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The centering is obtained giving a specific width to the ul (it could have also been a div or whatever) and giving it an "auto" margin for right and left.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload