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.

Hyperlinks don't work

Discussion in 'HTML & Website Design' started by milos112, Dec 21, 2014.

  1. #1
    Hello, I am working on one of my first websites and I have a problem.

    For some reason, when I try to open my work on a browser this "read more..." text will not work as a hyperlink.
    Does it have to do with the relative positioning? Also, the banner that I placed the button on, has the z-index of -1.



    HTML CODE:
    
    <div>
    <a href="#" class="fastreadm"> read more...</a>
    </div> <!-- readmore hyperlink -->
    Code (markup):
    CSS CODE:
    
    .fastbutton {
        left: 457px;
        top: 24px;
        position: relative;
    }
    
    .fastreadm {
        color: #FFFFFF;
        font-family: Trebuchet MS;
        font-size: 12px;
        left: 472px;
        position: relative;
        top: -6px;
    }
    a.fastreadm {
        text-decoration: none;
    }
    a.fastreadm:hover {
        color: #FDC1D1;
    }
    
    Code (markup):

    I do not really understand what is wrong here.
    Any help will be greatly appreciated!
     
    milos112, Dec 21, 2014 IP
  2. milos112

    milos112 Member

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #2
    PS. There are also other hyperlinks on the project, but they work PERFECTLY fine.
     
    milos112, Dec 21, 2014 IP
  3. Kristinlynnxo

    Kristinlynnxo Member

    Messages:
    12
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #3
    Where the # is on the code should be replaced with the URL
    1. <a href="PLACE YOUR URL HERE" class="fastreadm"> read more...</a>
     
    Kristinlynnxo, Dec 21, 2014 IP
  4. milos112

    milos112 Member

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #4
    It didn't seem to help, but thanks for trying! :)
     
    milos112, Dec 21, 2014 IP
  5. Kristinlynnxo

    Kristinlynnxo Member

    Messages:
    12
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #5
    Are you creating all of the coding yourself or are you running off of wordpress or similar?
     
    Kristinlynnxo, Dec 21, 2014 IP
  6. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #6
    Some element is covering your link element. This is a common issue when using out-of-the-flow positioned elements. That you're using shifted, relative positioned elements, apparently for layout, indicates a lack of understanding of how the position property works and why it is not the proper tool for creating your layout.

    It may be that it can be fixed temporarily (while you refactor the css and maybe the structure), but we need to see the full page. Give us a link.

    cheers,

    gary
     
    kk5st, Dec 22, 2014 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #7
    Gary (kk5st) is likely on the right track -- though to really dial in the proper answer we'd need to see a hell of lot more of your code to dial it in. Things like... why the DIV around it for nothing, is your element it's over with the z-index actually a sibling to the relative elements or is that anchor a child/grandchild of a sibling to it?

    Remember, z-index is inheritance relative to the parent, not the page.

    .. and really, relative positioning that far across the page (leaving the element in flow in it's original location) is VERY suspect, and indicative of broken site building methodologies.
     
    Last edited: Dec 25, 2014
    deathshadow, Dec 25, 2014 IP
  8. jamjar919

    jamjar919 Well-Known Member

    Messages:
    332
    Likes Received:
    7
    Best Answers:
    5
    Trophy Points:
    180
    #8
    Please post your full site code. Many things could cause this to happen - Does the element hover effect work? Do you have any scripts on your site that could interfere with the link?
     
    jamjar919, Jan 2, 2015 IP