Forum Moderators: not2easy

Message Too Old, No Replies

Image is not clickable.please help!

         

richardcomeout

6:53 pm on May 2, 2010 (gmt 0)

10+ Year Member



I have coded an image to be clickable, but its not clickable.

<div class="quicknav">
<div class="wrapper">
<div class="livesupport">

<a href="http://google.com"><img src="images/phone.png"></a>

</div></div></div>

CSS code

.livesupport {
position: absolute;
top:15px;
right:-5px;
padding:1px 0 0 0;}
.quicknav {
width: 100%;
height: 0px;
background: #fff;
border-bottom: 1px solid #c8c8c8; }

.quicknav a { color:#9a9a9a; }
.quicknav a:hover {color:#343434; }
.wrapper {
position: relative;
width:977px;
margin: 0 auto; }


Thanks in advance!

Matthew1980

12:42 pm on May 7, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi there richardcomeout,

Welcome to webmasterworld :)

Does the code work without the css class reference there? I mean does it work if you code it as just a link with no frills to it?

I suspect as you would need to have the class done as this:-

.livesupport a {
color:#9a9a9a;
}
.livesupport a:hover {
color:#343434;
}

Failing that just do its own class.

But there is nothing wrong with the <a href>

When you hover over as it stands, does the status bar change is value at all?

Cheers,
MRb

rocknbil

7:21 pm on May 7, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have coded an image to be clickable, but its not clickable.....

position: absolute;


I suspect that if you're using absolute positioning here, you may be using it elsewhere, and it's entirely possible that some other element is "covering" the image and anchor. Try experimenting with putting borders on adjacent elements, which may reveal that something is covering it.

Matthew1980

5:56 pm on May 9, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi there Rocknbil,

I thought about this after I posted, I rarely use the position attribute in css, with the exception of aesthetic effects drop down divs etc. So using the attribute in this case may well have 'covered' it up.

Good luck with finding the error anyway richardcomeout.

Cheers,
MRb

rocknbil

8:19 pm on May 9, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, not **this** absolutely positioned element (from what I can see) but maybe others. Absolute positioning takes the element out of the natural document flow, like floating, but can be worse. Example, three absolutely positioned elements can be positioned at 0,0 and the top one wins. :-)