Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In your example of what you want to achieve... There is two divs for the same pic.<br/> One "regular" and one "hover" that only appears on hover.<br/> This hidden one as a z-index of 2 and is shown over the first... Wich give that impression of a resising div. But it's not the case.<br/> ;)</p> <p>===<br/> EDIT: ok Ryh, see this start I've done for you here...<br/> Without jQuery, you will not have any "shiny effects" like fadein/fadeout...<br/> But, it may be a choice to do it like this :<br/> <br/> CSS:</p> <pre><code> div.item {width:200px;} div.hover {display:none; position:relative; z-index:2; top:-200px; width:300px;} // The top:-200px is to move the big image up... depends on the small pic height. // And the width are in fonction of the pics width. </code></pre> <p>HTML:</p> <pre><code> &lt;div class="item" id="img1" onmouseover="showbigger(this.id);"&gt; &lt;img src="something.jpg" style='width;200px; height:200px; border:1px solid black;'&gt; &lt;/div&gt; &lt;div class="hover" id="img1big" onmouseout="shownormal(this.id);"&gt; &lt;img src="something-bigger.jpg" style='width;300px; height:300px; border:1px solid black;'&gt; &lt;/div&gt; &lt;script&gt; function showbigger(ref){ document.getElementById(ref+'big').style.display='inline'; } function shownormal(ref){ document.getElementById(ref).style.display='none'; } &lt;/script&gt; </code></pre> <p>You'll have to play a little with positioning and pic sizes.<br/> And this may not a perfect solution... but it's a start if you want to do it with JavaScript.</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.
    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