HTML Bookmarklet Not Working

Discussion in 'HTML & Website Design' started by Superluigi6, Aug 3, 2013.

  1. #1
    Hi there,

    I made a post and am trying to add a bookmarklet to be taken to another post.
    I added the HTML ID to the section of a post that I want to be taken to. In the post with the link, when I click on it, this is what I see and get taken to:

    jelly bean.JPG

    How do I fix it so when I click on the link, it will not show the text as a link?
     
    Last edited: Aug 3, 2013
    Superluigi6, Aug 3, 2013 IP
  2. Enursa

    Enursa Well-Known Member

    Messages:
    263
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    100
    Digital Goods:
    1
    #2
    ???? Confuse.. what the problem. Can you explain more??
     
    Enursa, Aug 3, 2013 IP
  3. Superluigi6

    Superluigi6 Greenhorn

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    23
    #3
    Okay, there is a new issue. I'll try to explain it more clearly:

    I added the HTML ID to the section of a post that I want to be taken to. In the post with the link, when I click on it, this is what I see and get taken to:

    jelly bean.JPG

    How do I fix it so when I click on the link, it will not show the text as a link?
     
    Superluigi6, Aug 3, 2013 IP
  4. Enursa

    Enursa Well-Known Member

    Messages:
    263
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    100
    Digital Goods:
    1
    #4
    oh. I got it now. Do you have insert style for your ID? try insert " text-align: -99999 em " in your style. It have function to move the text far way from the screen.
     
    Enursa, Aug 4, 2013 IP
  5. Superluigi6

    Superluigi6 Greenhorn

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    23
    #5
    Where do I add it in the HTML? If you would like to see the HTML I added, just ask.
     
    Superluigi6, Aug 5, 2013 IP
  6. Enursa

    Enursa Well-Known Member

    Messages:
    263
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    100
    Digital Goods:
    1
    #6
    Send the HTML code.

    <a href="#" id="your_ID" style="text-indent: -99999em; background: url(your_background_image_url_path); width: "width"px; height: "height"px; float: left;">Android 4.3. jelly bean</a>
    Code (markup):
     
    Last edited by a moderator: Aug 24, 2013
    Enursa, Aug 5, 2013 IP
  7. Superluigi6

    Superluigi6 Greenhorn

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    23
    #7
    Do I add this to either the post with the ID or the post with the link?
     
    Superluigi6, Aug 5, 2013 IP
  8. Enursa

    Enursa Well-Known Member

    Messages:
    263
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    100
    Digital Goods:
    1
    #8
    That is inline style, and the ID is for the link. If you wish to style all link with the image, i suggest you put the style before </head>
    <style>
    your_ID {
      text-indent: -99999em;
      float: left;
      width: .....px;
      height: ......px;
      background-image: url('........');
      background-repeat: no-repeat;
      background-position: left top;
    }
    </style>
    
    </head>
    Code (markup):
     
    Enursa, Aug 5, 2013 IP
  9. Superluigi6

    Superluigi6 Greenhorn

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    23
    #9
    Doesn't work.

    Is there any code I need to add to the post with the link?

    Should I show you what I added?
     
    Superluigi6, Aug 5, 2013 IP
  10. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #10
    Uhm, if its not going to have a HREF, and you aren't using the NAME attribute like it's still 1997... why are you using an Anchor?

    <span id="your_ID">Android 4.3. jelly bean</span>

    Will work just fine. (Also all that presentational inlined style is just bad practice/methodology)

    You don't want it to be an Anchor, don't make it an <A> tag, it's that simple. That's the advantage of ID over the older NAME attribute, as an ID on ANY element can be targeted via a hash in a link.
     
    deathshadow, Aug 7, 2013 IP
  11. Superluigi6

    Superluigi6 Greenhorn

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    23
    #11
    Um, if I added this code to the Blogger post with the ID, what code do I add to the post I want with the link?

    FYI, I'm a noob in HTML.
     
    Superluigi6, Aug 7, 2013 IP
  12. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #12
    Well, THAT would be an Anchor.

    <a href="urlToThePageTheIDisOn#your_ID">Text you want to link to the ID</a>

    A good example can be found on one of my websites... all my pages have sections that start with ID's, for example the footer:
    <div id="footer">

    and so forth, and I have what's called a 'accesskeys menu' that is filled with links thus:
    <a href="#footer"
    	accesskey="9"
    	rel="nofollow"
    	title="Bottom of Page"
    >Bottom of Page</a>
    Code (markup):
    (Side note, ONLY time there's a reason to use TITLE that's the same as the contents of a A -- when you have accesskeys for said related menus.)

    While that's a in-page link, this URI:
    http://www.ewiusb.com/#footer

    ... will take you straight to that DIV#footer on the page. This works for ANY 'ID' on a page.

    We all start somewhere -- and there's a lot of web rot, outdated/outmoded practices, and just plain bad advice out there. That's why it's good you came someplace like this to ask. Might take a bit to bring you up to speed, but that's why those of us answering questions are here.
     
    deathshadow, Aug 7, 2013 IP
    kk5st and ryan_uk like this.