Note that there are some explanatory texts on larger screens.

plurals
  1. POHtml 5 section behaving out of the track
    primarykey
    data
    text
    <p>I am new to html 5 and I am learning this, the problem which i faced is section is not applying my given class I dont know what is the problem.</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;link rel="stylesheet" href="css/style.css"&gt; &lt;/head&gt; &lt;body&gt; &lt;header role="banner"&gt; &lt;hgroup class="main_container"&gt; &lt;h1 id="logo"&gt;&lt;/h1&gt; &lt;/hgroup&gt; &lt;/header&gt; &lt;nav&gt; &lt;ul class="main_container"&gt; &lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;News&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Initatives&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Publications&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Green Homes&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Renewble Energy&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Global Warming&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Lives&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt; &lt;section class="main_container"&gt; &lt;h1&gt;Why this kolaveri dee? &lt;/h1&gt; &lt;/section&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>======css====</p> <pre><code> body { margin:0; background:#F6F5F1; font-family:Geneva, Arial, Helvetica, sans-serif; } h1 { margin:0; } .main_container { width:950px; margin:0 auto; } header { background:#fdf7e7; padding:10px; } #logo { background:url(../images/logo.jpg); height:72px; width:302px; } nav { background:#e9ebb0; height:41px; border-bottom:1px solid #c4c297; } nav ul { list-style:none; background:#577a70; height:31px; text-align:center; margin:0; padding-top:10px; border-bottom:1px solid #3c4852; } nav ul li { float:left; } nav a { text-decoration:none; color:#ffffff; padding:0 20px 0 0; margin-right:20px; border-right:1px dotted white; } nav li:last-child a { border-right:none; } nav a:hover { color:#FFFF33; } section { height:200px; clear:both; padding:0; margin:0 auto; width:950px; background:#577a70; } </code></pre> <hr> <p><img src="https://i.stack.imgur.com/YmQ1s.png" alt="enter image description here"></p> <p>jsfiddle link > <a href="http://jsfiddle.net/LNAcV/5/" rel="nofollow noreferrer">http://jsfiddle.net/LNAcV/5/</a></p> <p><strong>Edit</strong> : Everyone thanks for the help i restructured the whole thing and did not found the same issue again. something was wrong in my code I guess now its working fine.</p>
    singulars
    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.
 

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