What's wrong with my code?

Discussion in 'HTML & Website Design' started by Thailand_for_YOU, Jan 24, 2009.

  1. #1
    The page in question is working without a glitch in IE (I'm using v.7), but there is a problem in Firefox (v.3.0.5).

    The problem is related to the internal links (a.k.a. tags: <a name="NAME"></a> and <a href="#NAME"></a>). They just do not work. :mad:

    To see the problem just go to: http://www.th4u.com/embassies.htm and click on any of the flags...

    Thank you for the help.
     
    Thailand_for_YOU, Jan 24, 2009 IP
  2. MikeHayes

    MikeHayes Peon

    Messages:
    95
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm not a FF expert but apparently they won't work so you'll need to find a solution. Sorry, I don't have one.

    Mike
     
    MikeHayes, Jan 25, 2009 IP
  3. normalfx

    normalfx Peon

    Messages:
    111
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    example for Embassy of Australia you need to put <a name="ausl"></a> within <th>...</th>

    the code :
    <th><a name="ausl">Embassy of Australia <a href="http://www.austembassy.or.th" target="_blank"><font face="Arial" size="1">Website</font></a></th>
     
    normalfx, Jan 25, 2009 IP
  4. Thailand_for_YOU

    Thailand_for_YOU Guest

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thank you very much. That did the trick. As soon as I moved the code (<a name="NAME"></a>) from <tr> tag into <td>, everything is working as intended.

    An aside question, if I may.
    It is about the <hr> tag on the same page (http://www.th4u.com/embassies.htm). If you compare how it looks in IE and FF, you'll see the difference.
    It is implemented by the following code (in the header inside the <style> tags:
    hr.sub{color:red;height:7px;border: double 2px blue}
    Code (markup):
    What is the problem ?
     
    Thailand_for_YOU, Jan 25, 2009 IP
  5. normalfx

    normalfx Peon

    Messages:
    111
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    some properties are varied display by web browser rendering such as border: double. I hardly use double to prevent this problem.
     
    normalfx, Jan 25, 2009 IP
  6. Sapphiro

    Sapphiro Well-Known Member

    Messages:
    1,242
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    175
    #6
    for the <a name>, have the end tag right after you declare it. :) Try to use less of font tags too btw, use css instead. ;)
     
    Sapphiro, Jan 26, 2009 IP
  7. Thailand_for_YOU

    Thailand_for_YOU Guest

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yes, I know that it is possible to put the code together like this ( <a name="NAME"></a> ), thank you.
    I was struggling with that problem quite a long time, trying many and different alternatives, options, changes, etc., till a simple solution of placing the code outside the <tr> tag was suggested by normalfx.
    --

    Re: <font ...> vs CSS

    "It isn't easy to teach old dog the new tricks." Joking aside, would you please give me an example.
     
    Thailand_for_YOU, Jan 27, 2009 IP
  8. normalfx

    normalfx Peon

    Messages:
    111
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    by the way you don't need <a name="NAME"></a> anymore. just declare The ID in your table th cell.
    code:
    original
    <th><a name="ausl">Embassy of Australia <a href="http://www.austembassy.or.th" target="_blank"><font face="Arial" size="1">Website</font></a></th>

    more clean up
    <th id="ausl">Embassy of Australia <a href="http://www.austembassy.or.th" target="_blank"><font face="Arial" size="1">Website</font></a></th>
     
    normalfx, Jan 29, 2009 IP