Note that there are some explanatory texts on larger screens.

plurals
  1. POMaking fixed header and scrollable content
    text
    copied!<p>Plz I want to ask how to make the following: - Fixed background for all (header &amp; content) >>> I made it well. - Fixed header while the content scrolls >>> I made it well.</p> <p>But the issue is: since I'm using a fixed background image, and the fixed header is transparent; when the page scrolls, the content appear under the header (because it's transparent) ..... I've tried to gave the header the same background of the body and it gone well on the desktop, but it appears abnormal on the iPad! that's why I've resorted to make the header transparent and then the problem appears.</p> <pre><code>&lt;div class="myHeader"&gt; &lt;header&gt; &lt;a href="index.php"&gt;&lt;img alt="" src="images/bigLogo.png"&gt;&lt;/a&gt; &lt;/header&gt; &lt;nav&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="index.php"&gt;HOME&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="about.php"&gt;ABOUT&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="ceo.php"&gt;CEO&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt; &lt;/div&gt; &lt;div class="container"&gt; &lt;p&gt;bla bla bla long text here&lt;/p&gt; &lt;/div&gt; body { background-color:#080717; background-image: url('../images/fixedBG.jpg'); background-position: top center; background-repeat: no-repeat; background-attachment: fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } .myHeader { position: fixed; width: 100%; display: block; height: 255px; top: 0px; z-index: 1; text-align: center; margin: 0px auto 0px auto; } .container { margin: 255px auto 0px auto; text-align: left; width: 541px; 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