Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

my webpage menu not playing well with image loading code

Options
  • 06-01-2010 10:17pm
    #1
    Closed Accounts Posts: 6


    I am using this fancy box code to smoothly pop up an image on click, I got it working on my main index page but that's not where I want to put it. My site has a menu where it loads external webpages inside the main index one, I would like to use the code on one of those pages but something is not working.

    I have been told its a DOCTYPE issue but I am not able to use the specified DOCTYPE, however I find that it works all the same with my current DOCTYPE choice. If I use the given one in addition to the one I use now (and need) then my site does not work properly, further if I replace it I get the same results.

    My existing doctype:
    <DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"
    			"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"
    			"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    

    What the code uses:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    

    I'm not sure what the differences are but I've been advised that I need to run the code in "standards mode" before I try to fix it. As I see it the code works, just not where I need it to, nothing unusual on my site and nothing unusual that I may be wrong.

    On my site you can see at the bottom right a blue text link called "aaaa" this is the code that works (never mind it conflicting with the Java applet, its just to prove it works, its only temporary), however (clicking the dome to the left of that to scroll the page down and selecting the "met.a has guts" menu option diagram) you'll see the "aaaa" link again at the bottom left of that page and that is where I need it to work from.

    I even tried using the exact code from the example in that linked .htm page but it doesn't make a difference, it probably even hinders the code as it looks at the main html page. However loading the page on its own the code will work, so its related to the menu and the way that works.


    If anybody can help that would be brilliant, I'm sure its something simple.

    Thanks in advance!


Comments

  • Closed Accounts Posts: 263 ✭✭HandWS LTD


    Any Doctype you may have tells the web browser what version of the markup language your page is written in.

    It specifies the rules for the markup language, so that the web browsers can render your content correctly.

    Are you using Framesets for your website? They are are not allowed for most strict or traditional doctypes.

    Your current doctype is not a valid doctype:
    <DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"
                "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    

    Sounds like you are mixing your doctype by putting in both Strict and Traditional. Only one is required.

    This doctype is the correct code for a xhtml strict:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    

    This doctype is the correct code for a xhtml traditional:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    

    If you want to use Framesets, then the required doctype for a xhtml traditional is:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
    


  • Closed Accounts Posts: 6 oailon


    Apparently my sloppy coding efforts have come back to bite me, not detrimental to the workings of my site but something I have to shelve onto the back-burner I guess.

    Shame. I always wanted to hire a programmer to tidy things up, but wanted to get it all done myself.


  • Closed Accounts Posts: 9 dannystaple


    Perhaps a good starting point would be to move away from the framesets, and find routes using DIV tags and CSS to achieve a similar, and compatible layout.


Advertisement