Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I suppose you want .leaderRating DIV on top of the other DIV's with images. To achieve this try the following modifications:</p> <ul> <li> put the overlaying DIV (.leaderRating) inside the main container (#contestLeaders) </li> <li> add the following CSS styles: { position: relative; } for the container and { position: absolute; top: 0; } for the overlay </li> </ul> <p>This way you are absolute-positioning the overlay relative to the container. In the end, you shoud come up with the following code:</p> <p>HTML:</p> <p><code></p> <pre><code>&lt;div id="contestLeaders"&gt; &lt;div class="leader"&gt;&lt;img src="css/images/chili-photo.jpg" width="138" height="138" /&gt;&lt;/div&gt; &lt;div class="leader"&gt;&lt;img src="css/images/chili-photo2.jpg" width="138" height="138" /&gt;&lt;/div&gt; &lt;div class="leader"&gt;&lt;img src="css/images/chili-photo3.jpg" width="138" height="138" /&gt;&lt;/div&gt; &lt;div class="leader"&gt;&lt;img src="css/images/chili-photo4.jpg" width="138" height="138" /&gt;&lt;/div&gt; &lt;div class="leader"&gt;&lt;img src="css/images/chili-photo5.jpg" width="138" height="138" /&gt;&lt;/div&gt; &lt;div class="leaderRating"&gt;5.0&lt;/div&gt; &lt;/div&gt; </code></pre> <p></code> </p> <p>CSS:</p> <pre> #contestLeaders {overflow:hidden; position: relative; } #contestLeaders .leader {float:left; margin-right:4px;} .leaderRating {background:url(images/leader-rating-bg.png) no-repeat; width:138px; height:37px; color:#fff;font-size:18px;padding:10px 0px 0px 35px; position: absolute; top: 0; } </pre>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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