Note that there are some explanatory texts on larger screens.

plurals
  1. POEqual and full width navigation
    primarykey
    data
    text
    <p>I'm working on a web app for my HCI class and having issues with my navigation. I'm trying to have my navigation be the full width of the screen, with each text block being equal. I have ten total items. I'd like to also include an icon above the text, but that is still in the works. My current code aligns the text to the left, and is not stretching full width of the nav. Any help would be great.</p> <p>HTML:</p> <pre><code>&lt;nav&gt; &lt;div id = "location"&gt;&lt;a href=””&gt;Location&lt;/a&gt;&lt;/div&gt; &lt;div id = "weather"&gt;&lt;a href=””&gt;Weather&lt;/a&gt;&lt;/div&gt; &lt;div id = "waterlevels"&gt;&lt;a href=””&gt;Water Levels&lt;/a&gt;&lt;/div&gt; &lt;div id = "wavereports"&gt;&lt;a href=””&gt;Wave Reports&lt;/a&gt;&lt;/div&gt; &lt;div id = "runs"&gt;&lt;a href=””&gt;Current Runs&lt;/a&gt;&lt;/div&gt; &lt;div id = "hatches"&gt;&lt;a href=””&gt;Hatches&lt;/a&gt;&lt;/div&gt; &lt;div id = "photogallery"&gt;&lt;a href=””&gt;Photo Gallery&lt;/a&gt;&lt;/div&gt; &lt;div id = "anglermaps"&gt;&lt;a href=””&gt;Angler Maps&lt;/a&gt;&lt;/div&gt; &lt;div id = "recipes"&gt;&lt;a href=””&gt;Recipes&lt;/a&gt;&lt;/div&gt; &lt;div id = "meetups"&gt;&lt;a href=””&gt;Meet Ups&lt;/a&gt;&lt;/div&gt; &lt;/nav&gt; </code></pre> <p>CSS:</p> <pre><code>nav { display: -webkit-box; display: -moz-box; display: box; -webkit-box-orient:horizontal; -moz-box-orient:horizontal; box-orient:horizontal; border-bottom:2px solid #111; width: 100%; margin-left: auto; margin-right: auto; background:white; } nav a { display:block; margin-left: auto; margin-right: auto; width: 100%; color:#111; padding:10px; -webkit-box-flex:1; -moz-box-flex:1; box-flex:1; text-align:center; text-decoration:none; -webkit-transition:all .4s linear; -moz-transition:all .4s linear; -o-transition:all .4s linear; transition:all .4s linear; } </code></pre>
    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.
    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