Note that there are some explanatory texts on larger screens.

plurals
  1. POHaving smaller images appear over a larger image
    primarykey
    data
    text
    <p>I am trying to have 2 small shapes appear over one larger image; one at the top left &amp; the other at the bottom right. So the picture should look like the below one:</p> <p><a href="http://i52.tinypic.com/j5cqw9.png" rel="nofollow">http://i52.tinypic.com/j5cqw9.png</a></p> <p><strong>My problem is that my HTML &amp; CSS is not making the smaller images lie over the top of the larger image &amp; the smaller images are not placed in the correct position.</strong></p> <p>What am I doing wrong? <em>PS: is CSS vertical-align cross-browser</em></p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;&lt;/title&gt; &lt;style type="text/css"&gt; &lt;!-- body { background-color: gray; } .col1 { width: 30%; float: left; background-color: blue; } .col2 { width: 70%; float: left; } #pastEvents { background-color: red; } #pastEvents td { padding: 20px; background-color: blue; } .pastEventDiv { position: relative; background-color: yellow; } .eventBorderNorth { position: absolute; left: 0px; top: 0px; z-index: 10; } .eventBorderSouth { float: right; vertical-align: bottom; z-index: 10; /*text-align: right;*/ } .eventPic { position: absolute; left: 0px; top: 0px; z-index: 0; } --&gt; &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="col1"&gt; abvdvf &lt;/div&gt; &lt;div class="col2"&gt; &lt;table id="pastEvents"&gt; &lt;tr&gt; &lt;td&gt; &lt;div class="pastEventDiv"&gt; &lt;img class="eventBorderNorth" src="images/picBorderNorth.png" width="30" height="30" alt=""/&gt; &lt;img class="eventBorderSouth" src="images/picBorderSouth.png" width="30" height="30" alt=""/&gt; &lt;img class="eventPic" src="images/1.jpg" width="100" height="200" alt=""/&gt; &lt;/div&gt; &lt;/td&gt; &lt;td&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    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.
    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