473,385 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

positioning an image on a gallery page

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
Narrow images stay over to the right rather than being in the middle over
even in the same spacing as the wider images. The two images at the bottom
are the examples

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?

This is the stylesheet (gal.css)

#logo {background:#9c9c7f;}
#showcase {background:#ffffff; width:100%}
#foot {background:#9c9c7f;}
#wrapper, #content, #far_right {border-bottom:1px solid #664;}
#gallery {position:relative; width:95%;}
#thumbs a {display:block; float:left; margin:0 0 5px 5px; width:100px;
height:80px; border:1px solid #000;}
#thumbs a img {width:100px; height:80px; border:0;}
#thumbs a:hover {border-color:#ddd;}
#thumbs a:hover img {position:absolute; width:auto; height:auto; right:5px;
top:0; border:1px solid #333;}
..pageLink { font-family:Arial, sans-serif; font-weight:bold; font-size:95%;
color:#9F2D00; padding:10px; }
..prev {float:left;}

Rose
Jun 20 '07 #1
6 2125
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.


Jun 20 '07 #2
On 20 Jun, 15:06, "RoseW" <w...@nshurontel.on.cawrote:
This is a collection of images
Incidentally, another reason to have two images and show/hide the big
one rather than moving and resizing it would be to avoid the current
effect where it hides from the thumbnail bar whenever you highlight
it.

Although if you document this "bug" and call it a "feature", you've
made yourself one of the more effective "Anti image-saving" scripts
I've seen so far 8-)

Jun 20 '07 #3
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


Jun 20 '07 #4
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
I posted this before, but Bloody Evil Google ate it.

Don't use this as an image display page, as the need to actively
_hover_ the mouse makes it very inaccessible. Use it for a navigation
menu if you want, but let people select page-by-page where they want
to go and which image to look at. You can use SSI to embed this nav
bar onto all of them.

You might also like to look here:
<http://codesmiths.com/dingbat/lj/usenet/sidebar_gallery/>
(Can you tell I've got a deadline to be avoiding?)

Jun 20 '07 #5
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
|
| I posted this before, but Bloody Evil Google ate it.
|
| Don't use this as an image display page, as the need to actively
| _hover_ the mouse makes it very inaccessible. Use it for a navigation
| menu if you want, but let people select page-by-page where they want
| to go and which image to look at. You can use SSI to embed this nav
| bar onto all of them.
|
| You might also like to look here:
| <http://codesmiths.com/dingbat/lj/usenet/sidebar_gallery/>
|
|
| (Can you tell I've got a deadline to be avoiding?)

I have a 'lazy' special interest group <lolThese viewers in the plant
group and associated friends love hover and not clicking next to go to the
next page. One did mention that an image could not be saved. I hadn't
thought of any of them wanting to save an image. For me it has been a simple
way to put up a small number of images.

My you threw that sample together 'toute suite' ( I copied it) I had done a
redo using the <liand even after reading over the W3C info on <lithe
only way I could see to eliminate having a black dot beside each thumbnail
was to use <dl class="thumbs">and <dd>

You did get the narrow images more centrered which was the fine tuning that
I was looking for <grin>

It has been a good first posting the this newsgroup topic. I've been lurking
for a long time ~)
Rose
Jun 20 '07 #6
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
|
| I posted this before, but Bloody Evil Google ate it.
|
| Don't use this as an image display page, as the need to actively
| _hover_ the mouse makes it very inaccessible. Use it for a navigation
| menu if you want, but let people select page-by-page where they want
| to go and which image to look at. You can use SSI to embed this nav
| bar onto all of them.
|
| You might also like to look here:
| <http://codesmiths.com/dingbat/lj/usenet/sidebar_gallery/>
|
|
| (Can you tell I've got a deadline to be avoiding?)

I inserted this class into your 'inline css style'
..content{
margin: 0 200px 10px 200px;
padding: 2px;
background-color: #e4f5f6;
position: relative;
z-index: 3;
width: auto;
min-width: 120px;
}
This provides for a short statement at the top of the page and is over the
images as they appear. It has to be a short statement otherwise this
'content' will float overtop of the image<grin>
Where the image is located as a result of your work is fine and the narrow
image is more in the centre. Overall, I will need to be more conscious of
having similar width images in the future.
Thanks for your input.
Rose
Jun 20 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jane Withnolastname | last post by:
I am trying to re-work an old site by replacing the html with css. On the main page, I have a logo image which I needed centred on the initial screen. I found the solution here:...
8
by: Chris Dewin | last post by:
Hi. I run a website for my band, and the other guys want an image gallery. I'm thinking it would be nice and easy, if we could just upload a jpg into a dir called "gallery/". When the client...
2
by: kaizer bo | last post by:
Hi all, could someone show me how to add javascript functionality to a css image gallery? I would like to adapt the gallery at "http://www.cssplay.co.uk/menu/gallery_click.html" so that when a...
1
by: gescom | last post by:
My goal is to create essentially two galleries on a single page, in which the first gallery determines what the second gallery displays. For instance, the first gallery refers to the contents of the...
2
by: nino9stars | last post by:
Hello, I have just started messing with absolute positioning on webpages, and it definitely let's you do some creative things. Well, after much searching and help, I got the images I was using...
6
by: Mark | last post by:
hi, i'm trying to position something in the top right corner of a container, but i can't seem to figure out how to get it working. here's the html <div class='thumb'><a href='image.jpg'><img...
5
by: dabhand | last post by:
Hi This page http://www.dabhand.co.nz/ayupdev/gallery-riders.html works great in IE but not in Firefox... any help would be appreciated. It refers to an external javascript file which I have...
3
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine...
4
by: saunders1989 | last post by:
Hi, my goal is to create a website with an image gallery. i have about 6 buttons at the bottom of the page whcih when clicked will take you to a different album of photos. i have created the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.