Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS - Overlaying one image on top of another
    primarykey
    data
    text
    <p>I can't best describe this in words, so I'll show you with pictures. </p> <p>Here's how my designer intends the Gravatar images to look in the sidebar of our site:</p> <p><a href="http://i41.tinypic.com/rjnn6v.png">how the designer wants it http://i41.tinypic.com/rjnn6v.png</a></p> <p>Here's the overlay image I made (screenshotted from Photoshop):</p> <p><a href="http://i43.tinypic.com/s1sz2e.png">my overlay image http://i43.tinypic.com/s1sz2e.png</a></p> <p>Here's how it looks right now...</p> <p><a href="http://i42.tinypic.com/21j13s3.png">not quite ideal http://i42.tinypic.com/21j13s3.png</a></p> <p>Not quite ideal, I think you'll agree. This is the CSS code I am using:</p> <pre><code>.gravatarsidebar { float:left; padding:0px; width:70px; } .gravataroverlay { width:68px; height:68px; background-image: url('http://localhost:8888/images/gravataroverlay.png'); } </code></pre> <p>And here's the XHTML (and a sprinkle of PHP to fetch the Gravatar based on the user's email address, which is fetched from our database):</p> <pre><code>&lt;div class="gravataroverlay"&gt;&lt;/div&gt; &lt;div class="gravatarsidebar"&gt; &lt;?php $gravatar_link = 'http://www.gravatar.com/avatar/' . md5($email) . '?s=68'; echo '&lt;img src="' . $gravatar_link . '" alt="Gravatar" /&gt;'; ?&gt; &lt;/div&gt; </code></pre> <p>So what can I do? <strong>I can't use relative positioning</strong> as it makes the word 'Search' in the div below stay moved to the right.</p> <p>Thanks for your help!</p> <p>Jack</p>
    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.
 

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