View Full Version : slideshow problem
06-07-2007, 04:14 PM
hi everyone. i'm working on a site ( volunteer ) and having trouble with the slideshow. my two issues with it are:
-i'd like to change the background color of the text beneath ( slideshow ) and am unsure how.
-i'm also trying to link to a stylesheet and it's not working. my page does not validate with the slideshow on the xhtml page.
also is there a better slideshow i could use the code from elsewhere on the web?
thanks for any help.
here is the link:
06-07-2007, 07:23 PM
Someone else may have a "better" slideshow script, in which case, go with it.
But in the meantime, there a lot of things you can do to fix this. Look at the errors you got when trying to validate: most of them are because it doesn't look like you have quotes around your attributes. XHTML requires that. For example, you have this snippet:
<td id=CaptionBox class=Caption align=center bgcolor=#80C9FF>
This is the default caption.
At the very least, it should be:
<td id="CaptionBox" class="Caption" align="center" bgcolor="#80C9FF">
This is the default caption.
And actually, you should probably clean up the html to get rid of all of the old markup. That same snippet would be more like:
<td class="Caption" id="CaptionBox">This is the
default caption. </td>
Which leads into the other part of your question about how to change the background color of the caption. With the above code, you need to add an entry to your stylesheet:
I added some extra stuff so you could see how much control you would have over the caption. You will probably want to get rid of the font-family, -style and -size. But this is where you'd specify the background-color and the text alignment. (And I'm sure you'll want to change the color to something more pleasing to go with your page... again, just wanted you to see it was changed.)
I'm not sure about your stylesheet issue; the one that you have seems to work fine. One thing, if you were trying to link another stylesheet with the caption properties, since your code and markup use "Caption" you would need to have your stylesheet read .Caption It has to be consistent. Someone a little more knowledgeable may add to this or correct me if I'm wrong, but XHTML is very particular about case. I believe that the tags should all be lowercase: <td> not <TD>
I'm pretty much a newbie too, but these were a few things that seemed to scream for correction...
Hope this helped a little.
06-07-2007, 08:16 PM
thank you so much for your help lorie.
would it be better to use a different doctype so it validates? or would it be better to create a separate style sheet for the script? lastly, is putting quotes around all the attributes solve the validation errors in xhtml?
06-07-2007, 08:44 PM
There is a whole sticky discussion about DOCTYPE at the top of the HTML/CSS forum on this site:
The senior coders all have their opinions and reasons for them as to which one to use. Whichever one you chose, you have to put in the time to learn its rules. (And the advice one of the senior coders gave to me was to go with a STRICT doctype, be it HTML 4 or XHTML, because that makes you clean up your act.)
You could probably take the script off of the page but it would be a .js file not a stylesheet. But you still need to clean up the html. Depending on which DOCTYPE you chose, you will have to either self-close things like the <img> tag or get rid of the self-closing. I'm sorry I don't have a link to a good tutorial, but there probably are lots of links listed in various posts on this forum. Do a search of the forum to find a fairly new one.
One of your errors was that the <script> didn't have a type; in the <head> section where you have this:
that needs to be:
Things like that will clean up your page to validate.
Hope that helps,
06-08-2007, 08:27 PM
thanks again lorie for you much needed help.
i'm going to read more into each doctype usage more thoroughly. my first mentor had driven home to me to always use xhtml and i'd be better in the long run, which is why i used that doctype.
06-08-2007, 08:35 PM
It's looking better... btw, check your private messages.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.