Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Nov 2006
    Posts
    50
    Thanks
    11
    Thanked 1 Time in 1 Post

    slideshow problem

    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:
    http://traditionalfocus.com/brcatest.html
    Last edited by faclimber; 06-07-2007 at 08:26 PM.

  • #2
    New Coder
    Join Date
    May 2007
    Location
    NW USA
    Posts
    63
    Thanks
    0
    Thanked 2 Times in 1 Post
    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:

    Code:
       <td id=CaptionBox class=Caption align=center bgcolor=#80C9FF>
        This is the default caption.
        </td>
    At the very least, it should be:
    Code:
       <td id="CaptionBox" class="Caption" align="center" bgcolor="#80C9FF">
        This is the default caption.
        </td>
    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:

    Code:
    <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:

    Code:
    .Caption {
    	background-color: #ff00ff;
    	text-align: center;
    	font-family: Georgia;
    	font-size: 12pt;
    	font-style:italic;
    }
    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.

    lorie

  • #3
    New Coder
    Join Date
    Nov 2006
    Posts
    50
    Thanks
    11
    Thanked 1 Time in 1 Post
    thank you so much for your help lorie.

    fyi: i'm fairly new to hand coding web design ( xhtml and css ) and have no experience with javascript other than placing existing script.

    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?

    thanks again.

    edit: i'm probably calling it the wrong thing by saying stylesheet when talking about javascript. ( unfamiliar with correct term ) what i mean by this is having the script external from the xhtml.
    Last edited by faclimber; 06-07-2007 at 08:28 PM.

  • #4
    New Coder
    Join Date
    May 2007
    Location
    NW USA
    Posts
    63
    Thanks
    0
    Thanked 2 Times in 1 Post
    There is a whole sticky discussion about DOCTYPE at the top of the HTML/CSS forum on this site:
    Which Dtd (doctype) to use on page?

    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:


    Code:
    <script>
    
    ....some code....
    
    </script>
    that needs to be:

    Code:
    <script type="text/javascript">
    
    ....some code....
    
    </script>
    Things like that will clean up your page to validate.

    Hope that helps,

    lorie

  • #5
    New Coder
    Join Date
    Nov 2006
    Posts
    50
    Thanks
    11
    Thanked 1 Time in 1 Post
    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.

    i've managed to change and control a few things in the javascript. thanks again.

    http://traditionalfocus.com/brcatest.html

  • #6
    New Coder
    Join Date
    May 2007
    Location
    NW USA
    Posts
    63
    Thanks
    0
    Thanked 2 Times in 1 Post
    faclimber,

    It's looking better... btw, check your private messages.

    lorie


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •