Looks good in Safari, but not firefox.

Discussion in 'Web Design and Development' started by Brendon Bauer, Nov 12, 2007.

  1. Brendon Bauer macrumors 6502

    Joined:
    May 14, 2007
    Location:
    Good 'ol USofA
  2. KT322 macrumors newbie

    Joined:
    May 26, 2006
    #2
  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #3
    One thing to do is run your page through a HTML validator. It picked up over a hundred errors.

    One that I think is your problem is this line,
    HTML:
    <script src='http://www.summitnorthwest.org/sermons/BatmoAudioPop.js' type='text/javascript'/>
    Problem is that the script tag must have an actual end tag, the /> shorthand doesn't count for the script tag. That is likely the problem, but if not go through all of the validation errors your page has.
     
  4. Brendon Bauer thread starter macrumors 6502

    Joined:
    May 14, 2007
    Location:
    Good 'ol USofA
    #4
    Hey, thanks for getting back to me. I was just coming back here to report the same thing... After going through all the tags I finally found that. I need to go through and clean up the code.

    Thanks again! Works perfectly now!
     
  5. Brendon Bauer thread starter macrumors 6502

    Joined:
    May 14, 2007
    Location:
    Good 'ol USofA
    #5
    So, I've tried several doctypes... I have no idea which one to use. Every time I pick one I still get over 100 errors. Most of those errors I can't even find! They tell me I'm using a tag that is not supported, when I haven't used that tag once anywhere near the line they're suggesting. How can you make a valid website? I just used a template provided by WordPress...
     
  6. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #6
    Not sure what you're using to edit code, but I'm finding the errors mentioned when I validate the page. The first few deal with the body tag and its attributes. I'll assume you know how to edit the code by hand with my following help items.

    • The margin attributes aren't valid, this can be achieved with CSS though.
    • The tr tag can't have height or width attributes. tr is just a row container, those attributes should be set on the td tags contained inside the tr tag.
    • I also see a number of errors about img tags not being close correctly, fix them so that they are <img ... />. The img tag also needs the alt attribute even if it's empty technically.
    • The <BR> tag should be <br />. You can do a search and replace for those.
    • There's an error talking about "character data not allowed here" in the comments section. The nbsp entities need to be inside one of the td tags.
    This should get you started and will take care of about 80% I'd say. Let me know if you need any specific help with items. Don't depend too much on the line number it gives you. It makes assumptions that aren't always helpful.

    Oh, and the XHTML 1.0 Transitional DOCTYPE should be fine for now. If you get all of the errors fixed though you could probably do Strict instead. I find it easier some times to meet Strict validation than Transitional.
     
  7. Brendon Bauer thread starter macrumors 6502

    Joined:
    May 14, 2007
    Location:
    Good 'ol USofA
    #7
    Wow, thanks for your help! I'm going to try and fix some errors and hopefully I'll report back here with my progress :). I use smultron to edit the WordPress files, but I use Dreamweaver to mess with the files contained in the /html/ directory. Not a huge fan of Dreamweaver, but it serves to update my templates all around automatically for me.

    Again, those tips were really helpful. I'm ashamed because I've been in some bad habits doing exactly what you said not to :eek: for a very long time.
     
  8. Brendon Bauer thread starter macrumors 6502

    Joined:
    May 14, 2007
    Location:
    Good 'ol USofA
    #8
    Well, I've dropped the number of errors down to around 40-60 from 150 :D. Still doesn't beat the 15-20 errors from the dreamweaver files. Oh well, I feel better now that it works :). Thanks again for your help!
     
  9. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #9
    I'm glad I was able to help. I wasn't sure of of your level of understanding of HTML details so was hoping what I said didn't go over your head, but it sounds like you followed my advice just fine. Let me know if you need any further assistance.
     

Share This Page