Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make background image position stay same on all resolutions?
    primarykey
    data
    text
    <p>I have header (100% width, 277px height), and in <code>header</code> I should have background image, x-repeated, which will <strong>stay in same position</strong> (x axis position), on all resolutions (1024+ actually, no need for mobile version so far). This is how it should look on all resolutions:</p> <p><a href="http://i.imgur.com/5rT4Xi9.png?1" rel="nofollow">http://i.imgur.com/5rT4Xi9.png?1</a> (see profit, and cloud line under it - that's right position)</p> <p>However, by changing resolution, background image changes it's position too ...</p> <p>HTML:</p> <p> <h1>Webopps</h1></p> <pre><code> &lt;h2&gt;Helping you profit&lt;/h2&gt; &lt;h3&gt;from the Web&lt;/h3&gt; &lt;/div&gt; &lt;div id="menu"&gt; &lt;ul&gt; &lt;li&gt; &lt;a href="#"&gt;Contact us&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#"&gt;About us&lt;/a&gt; &lt;/li&gt; &lt;li class="has-sub"&gt; &lt;a href="#"&gt;The market&lt;/a&gt; &lt;ul class="submenu"&gt; &lt;li&gt; &lt;a href="#"&gt;Mainstream&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#"&gt;Adult&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#"&gt;Niche&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#"&gt;Downloads&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p></p> <p>CSS:</p> <pre><code>header { width:100%; height:277px; z-index:999; position:relative; background-image:url(images/clouds2.png); background-repeat:repeat-x; background-position:-133px 0px; } </code></pre> <p><a href="http://jsfiddle.net/kF7Br/" rel="nofollow">http://jsfiddle.net/kF7Br/</a></p> <p>Test link: <a href="http://bybyweb.com/webopps/" rel="nofollow">http://bybyweb.com/webopps/</a></p> <p>I have tried with media queries (not so smart solution, you can see at the bottom of my css, but without success), i have thought about js/jquery solutions, but have no idea how to make it... I am opened to all kind of hacks/solutions (css, jquery, html structure changes).</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.
    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