1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help with anchor links on my website

Discussion in 'HTML & Website Design' started by bad_bob00, Mar 19, 2007.

  1. #1
    Hi there,

    I've got 2 anchor links on a page on my website, when I click either of the links it takes me down to the section of the page i've linked to, but it cuts off the top half of my website.

    It's hard to explain without linking to the page, so here it is (click the article titles):

    http://www.paid2review.co.uk/moneyarticles.html


    Thanks for any help offered.
    Matt
     
    bad_bob00, Mar 19, 2007 IP
  2. Darkhodge

    Darkhodge Well-Known Member

    Messages:
    2,111
    Likes Received:
    76
    Best Answers:
    1
    Trophy Points:
    185
    #2
    Try changing:

    
    <a name="earn money from betting" id="earn money from betting">Earn from "Matched Betting"</a>
    
    Code (markup):
    To

    
    <a name="earn money from betting" id="earn money from betting"></a>Earn from "Matched Betting"
    
    Code (markup):
    And the same idea for the other one.
     
    Darkhodge, Mar 19, 2007 IP
  3. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #3
    Thanks for trying to help, I changed the code to what you suggested and have uploaded it again, still having the same problem though...
     
    bad_bob00, Mar 19, 2007 IP
  4. icebreaker

    icebreaker Peon

    Messages:
    349
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    please try to change this code: <a href="#earn money from adverts">Earn from Website Adverts</a> to <a href="http://www.paid2review.co.uk/moneyarticles.html#earn money from adverts">Earn from Website Adverts</a>

    do the same thing to the other one... hope this one works.
     
    icebreaker, Mar 19, 2007 IP
  5. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #5
    Just tried this and it's doing the same thing :( thanks for offering help...
     
    bad_bob00, Mar 19, 2007 IP
  6. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #6
    A hint: If styles are turned off, the links work as expected. I would suspect an absolute position or a hidden overflow. The css is too much of a cluster-f*** to dig into.

    You should also validate your html.

    cheers,

    gary
     
    kk5st, Mar 19, 2007 IP
  7. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #7
    Okay thanks for the help.
    I've tried validating my code before but it kept finding errors with the Google Adsense on my website, is this normal?
     
    bad_bob00, Mar 19, 2007 IP
  8. icebreaker

    icebreaker Peon

    Messages:
    349
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    better try this one

    change the codes <a name="earn money from adverts" id="earn money from adverts"></a>Earn from Website Adverts

    into

    <a name="earn money from adverts" id="earn money from adverts">Earn from Website Adverts</a>

    do the same thing to the other code... hope this one finally works.
     
    icebreaker, Mar 19, 2007 IP
  9. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #9

    Thanks for trying, but this is what it was originally. Darkhodge suggested changing it, now you are suggesting changing it back :)

    I appreciate the help, I think its probably an error with my CSS or something, as kk5st suggested.

    Thanks
     
    bad_bob00, Mar 19, 2007 IP
  10. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #10
    I knew something was nagging at me! Name, class and id tokens (names) may not contain spaces. I don't think this is related to your problem, but it is something to fix.

    What is the Google error? If it's the iframes, that's because iframe is not a part of any strict DTD. Switch the DTD to html4.01 or xhtml1.0 transitional.

    cheers,

    gary
     
    kk5st, Mar 19, 2007 IP
  11. unique-i

    unique-i Active Member

    Messages:
    188
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #11
    I've download the complete html page and edit it, tried changing code in different ways, but in vain.

    I think its type of a CSS problem or something, don't know excatly what is is. Try coding complete page in <Html.tables>, don't use <divs> and see it works or not.
     
    unique-i, Mar 19, 2007 IP
  12. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #12
    I've removed a load of errors from this page, now there are only 17 errors.

    One of these is to do with the bullet points marking the articles on my site, i'm not quite sure whats wrong with them though:


    Thanks for any help again
     
    bad_bob00, Mar 20, 2007 IP
  13. unique-i

    unique-i Active Member

    Messages:
    188
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #13
    Instead of:
    
    <td><li><a href="#earn-money-from-betting">Earn from "Matched Betting"</a></li></td>
    
    Code (markup):
    USE:
    
    <td><ul><li><a href="#earn-money-from-betting">Earn from "Matched Betting"</a></li></ul></td>
    
    Code (markup):
    <li> tag should be used inside <ul> or <ol> tag

    understand? :)
     
    unique-i, Mar 20, 2007 IP
    bad_bob00 likes this.
  14. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #14
    Thanks a lot, understand and reputation has been given :)

    Next problem :eek:

    How can I use the anchor links when it says the "name" is causing an error?


    Thanks again for the help
     
    bad_bob00, Mar 20, 2007 IP
  15. unique-i

    unique-i Active Member

    Messages:
    188
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #15
    Do not use
    
    <a name=earn-money-from-betting">Earn from "Matched Betting"</a>
    Code (markup):
    try using
    <a id=earn-money-from-betting">Earn from "Matched Betting"</a>
    Code (markup):
    Try use "ID" attribute instead of "NAME" attribute and see if it works
     
    unique-i, Mar 20, 2007 IP
  16. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #16
    Thank you :) rep given again EDIT: sorry I can't so soon, will give rep later when it lets me.

    Next problem :eek:

    Again, thanks for any help
     
    bad_bob00, Mar 20, 2007 IP
  17. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #17
    You haven't closed this <p> that I can see:

    <p><b><a id="earn-money-from-betting">Earn from "Matched Betting"</a></b>&nbsp; &nbsp;<i>Written by Matt Tutt</i><br/><br/>

    A <p> may only contain inline elements.

    The next error has the same cause. You're trying to open a <p> inside the last <p>.

    In html, this is allowed because the closing </p> tag is optional. It is required in xhtml.

    The various unknown attribute errors are due to them not being a part of any strict DTD, or not applicable to a particular element; deprecated in favor of css.

    The target attribute is deprecated in favor of javascript.

    The biggest error is the use of the xhtml 1.1 DTD. XHTML 1.1 should not be served as text/html. Use the xhtml 1.0 strict DTD. It may be served as text/html.

    cheers,

    gary
     
    kk5st, Mar 20, 2007 IP
    bad_bob00 likes this.
  18. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #18
    Thanks gary, rep has been left :)

    How do I edit all the Google code to prevent the errors? Do I need to edit each pieces of Google adverts to stop the individual errors? :confused:

    Thanks again
     
    bad_bob00, Mar 20, 2007 IP
  19. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #19
    To which errors and to which code are you referring?

    cheers,

    gary
     
    kk5st, Mar 20, 2007 IP
  20. bad_bob00

    bad_bob00 Active Member

    Messages:
    3,472
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    90
    #20
    Here are a few of them:





    About 4 more aswell. Thanks
     
    bad_bob00, Mar 20, 2007 IP