Note that there are some explanatory texts on larger screens.

plurals
  1. POHTML5 <Header><Nav> overlapping body
    text
    copied!<p>I am a newb to HTML5 and i can't seem to fix this problem. You can see from the image below that the header is overlapping the content area. How can i fix this? is it something with my header css? </p> <p><a href="http://imgur.com/pJn4i" rel="nofollow">http://imgur.com/pJn4i</a></p> <pre><code>&lt;!DOCTYPE HTML&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="UTF-8" /&gt; &lt;link href='http://fonts.googleapis.com/css? family=Open+Sans:300italic,600italic,600,300' rel='stylesheet' type='text/css'&gt; &lt;!--Stylesheet--&gt; &lt;link rel="stylesheet" type="text/css" href="style.css" media="screen" /&gt; &lt;!--[if lt IE 9]&gt;&lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;&lt;![endif]--&gt; &lt;!--HTML5 video player--&gt; &lt;link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet"&gt; &lt;script src="http://vjs.zencdn.net/c/video.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;header&gt; &lt;div id="headercontainer"&gt; &lt;h1&gt;&lt;a class="introlink anchorLink" href="#intro"&gt;Test Site&lt;/a&gt;&lt;/h1&gt; &lt;nav&gt; &lt;ul&gt; &lt;li&gt;&lt;a class="introlink anchorLink" href="#intro"&gt;Intro&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a class="portfoliolink anchorLink" href="#portfolio"&gt;Portfolio&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a class="aboutlink anchorLink" href="#about"&gt;About&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a class="contactlink anchorLink" href="#contact"&gt;Contact&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt; &lt;/div&gt; &lt;/header&gt; &lt;div id="content"&gt; &lt;article&gt; &lt;section&gt; &lt;h1 class="article"&gt; Lorem ipsum&lt;/h1&gt; Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. &lt;/section&gt; </code></pre> <p>Here is the corresponding CSS:</p> <pre><code>body{ margin: 0; font-family: 'Open Sans', sans-serif; font-size: small; background-image:url('Media\background.jpg'); background-repeat:repeat-y; padding-top::50px; } header { padding: 5px 0; width: 100%; background-color: #000; margin-bottom: 25px; position: fixed; z-index: 10; float: left; } #headercontainer, #contentcontainer { width: 960px; margin: 0 auto; position: relative; } </code></pre>
 

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