Andy Dingley wrote:
| On 20 Jun, 15:06, "RoseW" <w...@nshurontel.on.cawrote:
|| This is a collection of images with its own style sheet to create
|| the hover over the thumbnail and the larger image appears.
||
http://www4.webng.com/chesleyhs/imag.../Planting.html
|
|| Is there a way of having some information in the stylesheet to
|| accomodate if is a narrow image of the 400 x 640 pixel sizing?
|
| Looks promising!
|
| I'd change bits of your HTML to something like this:
|
| <ul class="thumbs">
| <li><a href="#"><img src="9606Elliotpark1_thumb.jpg" title="..."
| alt="..." ><span><img src="9606Elliotpark1_fullsize.jpg" title="..."
| alt="..." ></span></a></li>
|
| [...]
|
| </ul>
|
| and CSS that looks like this
|
| .thumbs span {
| display: none;
| }
| .thumbs a:hover span {
| display: block;
| width: 680px;
| text-align: center;
| }
|
| This has the following differences:
|
| * There's a separate thumbnail and full-size image. Client-side
| resizing of "dumbnails" is poor quality, can't crop and dooes nothing
| to improve download speeds
|
| * Flip the display of a container element (<span>) around the <img>,
| rather than moving and re-sizing the <imgitself. This means you can
| set the container size once and for all, then place the varying images
| and any captioning inside it.
|
| * Set display:block on the <spanrather than using a <div>. This
| keeps the HTML valid (can't nest <divinside <a>)
|
| * Use class not id on "large scale" features of a page. It makes the
| CSS selectors simpler.
|
| * You'll still need to position the <span Either use position
| absolute (which I hate), or position it relative to the <liparent
| and fiddle with the <li>s themselves so that they all start from the
| same place.
|
|
| You can probably work out the rest of the CSS for yourself, otherwise
| ask.
Thank you for the speedy reply.
I noted that the thumbnails lost quality if the original image sizing or
orientation changed and wondered what would be a remedy. I was trying to
keep things 'simple' in this image presentation but its a good point to have
quality thumbnails for some folks just look at the thumbnails and perhaps
pick one. This hover style may not be all that fine for dial up users.
I'll play around with the <lipossibilty. The way it is at the moment no
captions are possible so 'flip the display of a container element(<span>)
around teh <imgwould be useful.
At least there are possiblities <grin>
Rose