SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE - not displaying right :(

    Hi,

    I'm really hoping someone can show me what I'm doing wrong here. Its driving me nuts!

    http://www.cancunandrivieramaya.com/new/

    If you look at this in IE (I'm using IE8) , you will see its all screwed.

    After hours of debugging, I finally managed to put it down to this bit:
    Code:
    <div id="trips_playa" style="display: none; font-size: 7pt;">
       <ul>
    	<li>
    		<b><a href="#" onclick="show_hide_trips('trips_playa_popular');" style="color: red;">Popular Tours</a></b>
    		<div id="trips_playa_popular" style="display: none; font-size: 7pt;">
    		<ul>
    			<li><a href="http://www.cancunandrivieramaya.com/chichen-itza.htm">Chichen Itza</a></li>
    			<li><a href="http://www.cancunandrivieramaya.com/Tulum-XelHa.htm">Xel Ha with Tulum Ruins Option</a></li>
    		</ul>
    	</li>
    	<li><a href="http://www.cancunandrivieramaya.com/ultimate_jungle_adventure.html">Ultimate Jungle Adventure &amp; Tulum Ruins</a></li>
    	<li><a href="http://www.cancunandrivieramaya.com/riviera-maya-tours/snorkel_adventure.html">Snorkel Adventure</a></li>
    	<li><a href="http://www.cancunandrivieramaya.com/selvatica_rm.html">Selvatica's Extreme Adventure Tour</a></li>
    	<li><a href="/isla_mujeres_rm.htm">Sail to Isla Mujeres by Catamaran</a></li>
    	<li><a href="/isla_contoy.htm">Isla Contoy Nature Preserve</a></li>
    	<li><a href="/dolphins.htm">Swim with Dolphins in Cancun</a></li>
    	<li><a href="/captain_hook_show.htm">Captain Hook Pirate Show &amp; Dinner Show</a></li>
    	<li><a href="/carribeancruise.htm">The Booze Cruise</a></li>
    	<li><a href="/carribeancruise.htm">Pirate Assault</a></li>
    	<li><a href="/carribeancruise.htm">Caribbean Funday</a></li>
    	<li><a href="/whale_sharks.htm">Swim with Whale Sharks</a></li>
    	</li>
        </ul>
    </div>
    If I comment out this bit, it works fine.

    The weird bit is - that what I put this code in Frontpage, and click "find matching tag" for the first <li> tag, instead of it selecting the </li> bit 7 lines down, it goes the whole way to the last </li> ... what gives?

    I've had this before, and I think it was related to a </center> tag or something in the wrong place, but I don't think thats the case here :/

    TIA!

    Andy

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,323
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    looks like you forgot to close the "trips_playa_popular" DIV
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OMG - Your right!!!! I've fixed that. Still wasn't playing ball in IE though - turned out to be an extra </li> tag there, which was throwing it off.

    Shows how an extra pair of eyes can really help =) Thanks again (I've spent hours trying to debug this one)

    Cheers

    Andy

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,323
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    you might also consider running your code through a validator
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ya, gonna at some point. For some reason its coming up with weird errors, like:

    Line 157, Column 20: Attribute "src" exists, but can not be used for this element.

    <iframe src="http://www.cancunandrivieramaya.com/cgi-bin/gallery/ad_frame

    Surely src="" is valid, otherwise how the hell do you tell the browser what page to load? =)

    ...and:

    ine 160, Column 15: element "center" undefined. Did you mean "center" or "textarea"?

    <center><img src="http://www.cancunandrivieramaya.com/images/asta_logo.gi

    ...even though <center> and </center> exist around that image.

    Bit perplexed as to why they are coming up to be honest =)

    Cheers

    Andy

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by ultranerds View Post
    Surely src="" is valid
    You didn't read everything the validator said.

    "This error may also result if the element itself is not supported in the document type you are using."

    Strict DOCTYPES don't allow the use of iframe. They also don't allow the use of the <center> element.

  7. #7
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah ok - so which should I use?

    TIA!

    Andy

  8. #8
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, got it -

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    Thanks

  9. #9
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still seem to be getting quite a few errors though?

    http://validator.w3.org/check?uri=ht...F1.654#line-11

    ???

    TIA

  10. #10
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Well, the transitional one you have now is fine for iframe... There are still lots of other errors, though.

    Really, a better question might be, what can I do to make a strict doctype validate? The validator will point you in the right direction for that.

  11. #11
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    With the transitional one, I'm still getting a lot of errors. I'm at a bit of a loss though as to what they are on about though?

    For example - my meta tags end in /> , but that seems to be getitng moaned at by the validatior? I thought all XHTML had to end meta tags (br's, <img's etc with a /> ???)

    Cheers

    Andy

  12. #12
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by ultranerds View Post
    my meta tags end in /> , but that seems to be getitng moaned at by the validatior? I thought all XHTML had to end meta tags
    Yes, but you are using and HTML 4.01 doctype, not xhtml.

    You could try this:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  13. #13
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, thats helped quite a bit Still getting some weird ones about alt="" in an <a href :/ Surely alt= should ONLY be used in an <a href= ??

    TIA - much appreciate your time

    Andy

  14. #14
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    The alt attribute is really to provide alternative text for images (and a few other elements) when, for whatever reason, the image or other element can't be displayed.

    http://reference.sitepoint.com/html/img/alt

  15. #15
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah interesting - I've always used alt="" in the <a href, and title="" on the <img stuff.

    Will have to change my ways <G> Thanks for the heads up

    Cheers

    Andy


Bookmarks

Posting Permissions

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