PDA

View Full Version : Centering images in Ultimate fade-in slideshow (v2.4)



alpha45
07-12-2010, 06:20 PM
1) Script Title: http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

2) Script URL (on DD): http://negamaluca.altervista.org/indice1.html

3) Describe problem: Hi, please can you indicate how to Center images of different sizes in the created basic fixed-size?
I am not a javascript pro... Thanks so much for your help.
Grazie :o

jscheuer1
07-12-2010, 07:36 PM
It's usually automatic. However, you have some very non-standard HTML/css here:


. . . d" style="height: 20px"><a href="feste.htm"><b>FESTE</b></a></td>
<td class="menutoptd" style="height: 20px"><a href="matrimoni.htm"><b>
MATRIMONI</b></a></td>
</tr>
</table></center></body>




<body><center />
<div id="fadeshow1" style="position: absolute; top: 200px; width: 810px; height: 610px;">
</div>


</body>

Only one body allowed per page. But that's not the real problem. Using the <center> tag has been deprecated because it can often have unexpected consequences. It does here. If you change the above to:


. . . d" style="height: 20px"><a href="feste.htm"><b>FESTE</b></a></td>
<td class="menutoptd" style="height: 20px"><a href="matrimoni.htm"><b>
MATRIMONI</b></a></td>
</tr>
</table></center>
<div id="fadeshow1" style="position: absolute; top: 200px; width: 810px; height: 610px; left: 50%; margin-left: -405px;">
</div>


</body>

things will work out much better.

alpha45
07-13-2010, 03:55 PM
Thanks for the help.
I modified HTML as suggested, but with Expression3 Web images are centered and whole while on the website are not correct.????
The I image: <img src="http://negamaluca.altervista.org/Immagini1/100_3325.jpg" border="1" width="403" height="600">
II image: <img src="http://negamaluca.altervista.org/Immagini1/100_3329.jpg" border="1" width="470" height="600">
III image: <img src="http://negamaluca.altervista.org/Immagini1/100_3330.jpg" border="1" width="614" height="600">
IV image: <img src="http://negamaluca.altervista.org/Immagini1/100_3344.jpg" border="1" width="575" height="600">.
Excuse my ignorance!!!!
Thank you
use I.E 8 !!

jscheuer1
07-13-2010, 04:17 PM
I'm not sure what you mean. It looks OK to me. What browser are you using? Could you be more specific about what isn't where it should be and where it really should be?

Anyways, I didn't tell you to remove the <center> tag from your entire page, just from the slide show. It appears that you have removed it from the entire page. This will change how the rest of the page lays out, at least in some browsers.

You have two choices I can see:


Do as I originally suggested by restoring the center tag to the rest of the page, but not to the slide show.


Go to the CSS forum and open a thread there for help on how to lay out your page without the center tag.

alpha45
07-13-2010, 05:51 PM
I did not understand why now I see the first image right, but the second does not. This is the image I see right: http://negamaluca.altervista.org/Immagini1/100_3325.jpg and this and the other two do not. http://negamaluca.altervista.org/Immagini1/100_3329.jpg. Use Internet explorer 8, I have remitted the<center>to the place.</center> I hope that I've explained!!! Thanks a lot. http://negamaluca.altervista.org/Immagine2.jpg

jscheuer1
07-14-2010, 04:47 AM
OK, I think I know what you mean now.

When I look at the page in IE 8 though, all 4 of the images in the slide show are centered within it. Perhaps you are viewing an older cached version of the page.

To find out, close the tab with the page on it keeping one tab open to another site (any will do, Google for example).

Clear the browser's cache, then navigate to your page again.

But I also notice in the image from your post that the slide show image there (presumably 100_3329.jpg) looks much larger than in my IE 8. I have no idea why that is. It also appears with no black background on the sides as it does in my IE 8.

I thought you might be using zoom in your IE 8, but I cannot duplicate the appearance using zoom here.

What resolution is your monitor? That might be a factor.