PDA

View Full Version : FadeSlideShow



marquezs
03-31-2010, 10:47 AM
[SOLVED]

1) Script Title: FadeSlideShow

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem: I've trying to solve this problem for two hours. I'm tired, this is probably very simple but I haven't succeed in putting a margin of 20px on the slideshow.

Even if I create a style for fadeshow1 with margin-left of 20 px it won't go 20 px right. It stays in the same position and I wanted this to be alined with the text on my website: http://oscers.0fees.net/

Thanks in advance for your help!

jscheuer1
03-31-2010, 11:01 AM
This:


document.all.fadeshow1.style.marginLeft = "20px";

is not a good way to set the margin. It only works in a couple of browsers, and where you have it, it's too soon to even do it in those.

Also, this is redundant:


<link href="main.css" rel="stylesheet" type="text/css" />
<link href="main.css" rel="stylesheet" type="text/css" />

Get rid of one of them.

The preferred way to set style is in the stylesheet. So, in main.css, add this at the bottom:


#fadeshow1 {
margin-left: 20px;
}

marquezs
03-31-2010, 12:58 PM
Wow, it worked, thank you!

Believe it or not, I have tried what you side before I posted the problem but this time when I copied the code you wrote it worked.

It must have been a spelling mistake or something like that.

Thanks!