PDA

View Full Version : Centering Fading Slide Show and Mikes DHTML Scroller


flash12345flash
11-10-2002, 05:56 PM
Are you trying to center the Fading Slide Show?
Are you trying to center Mike's DHTML Scroller?

Let me help you do it right. I figured out the way to make it just perfect (you can view the results at www.photoshelf.net). If you would like the same results on your page, email me (maik@photoshelf.net) and I'll give you the breakdown instructions, step by step.

Maik

flash12345flash
11-12-2002, 04:03 AM
Thanks for all the emails, ...I wasn't expecting that many!

Since many people are trying to center the slideshow, I decided to post a solution here instead.

Add the following under the <body> of your page:

<table align="center">
<tr>
<td></td>
<td>
<script language="JavaScript1.2">

(Your Fading Slideshow goes here)

</script>
</td>
<td></td>
</tr>
</table>

Roy Sinclair
11-12-2002, 02:17 PM
Does your solution truly need those empty <td></td> cells on either side?

flash12345flash
11-13-2002, 04:38 AM
Hi. First let me say that I didn't write this part of the script, I copied from another user. Testing both options (with or without the lines <td></td>) did not make a difference on my PC, however I'm not sure if the purpose of such lines are for the proper functioning of different browsers. I figured there must be a purpose for the lines, it's why I didn't edit the script in the first place.

The original solution I had (my first message) was to insert a page inside another page (inline frame), centering the inline frame instead, but this solution takes a lot more steps than the script provided.

On my site (www.photoshelf.net), I used Left Shared Borders. Because of that, the center of my screen is not the center of my page, since the left shared border creates a left margin. In this case I rather use inline frames instead, and center the slideshow according to the space available after the left shared border.

I hope this helped you.