I read in the mentioned topic that these images are slide shows, does this mean that you know the width and height of the correct "floating" block?
IF so that the following script example may be an option if I don't think it is possible without saving the image first in the source.
IF so, that means first insert one empty div into the source code so that it matches the image / slideshow area and floats to the right for the "placeholder" .. then add a position relative to your main content area and absolutely position the actual images / slide- show above placeholder:
Sample script: HERE
full code as per comments:
HTML:
<div id="wrapper"> <div id="header"><h1>Header</h1></div> <div id="tabs">Tabs</div> <div id="main"> <div id="ssholder"></div> <div id="left"> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p> <p> add loads more content!</p> </div> <div id="sshow"> <img src="" alt="" width="200px" height="50px" /> <img src="" alt="" width="200px" height="50px" /> <img src="" alt="" width="200px" height="50px" /> <img src="" alt="" width="200px" height="50px" /> <img src="" alt="" width="200px" height="50px" /> <img src="" alt="" width="200px" height="50px" /> </div> </div> </div>
CSS
#wrapper { width: 600px; border: 1px solid #000; } #main { position: relative; border: 1px solid red; } #ssholder { float: right; width: 200px; height: 300px; } #sshow { position: absolute; width: 200px; height: 300px; top: 0; right: 0; background: #eee; } #sshow img { display: block; }
jQuery to determine height if not explicitly set to #sshow :
$(function() { var sshowHeight = $('#sshow').height(); $('#ssholder').height(sshowHeight); });
clairesuzy
source share