Jump to content

Add link to a background image


edoplaza

Recommended Posts

You unfortunately can't add a link to a background image. Either you'll have to make it a regular image, or perhaps put a transparent gif over the top and link that instead.

 

Edoplaza and Ben! Look at this and click the logo:-

 

http://www.wickham43.com/forumposts/edosdaconsultores090807.html

 

and the CSS file:

 

http://www.wickham43.com/forumposts/edomain090807.css

 

look at the two classes bglink1 and bglink2 which have been inserted into the html markup. It's a bit complicated but basically it makes the "a" tag display: block and then moves the link text off-screen to the left so you can't see it.

Link to comment
Share on other sites

Yes, the principle of a clickable background-image was working but there was a knock-on effect on adajacent divs.

 

I've fixed that now by adding position: relative to #top and changing the top position of #toppictures {top: -145px; /*0px;*/ }

Link to comment
Share on other sites

I would just do it like this...

 

 

Alternatively, this should work, but I couldn't find out why it wasn't. I think it was all the z-indexes you had going on. This would enable the text to be there if images were turned off (and not way off screen). I showed this successfully here (towards the bottom).

 

 

edit... Just noticed it's cutting off the height and couple other things in there. Tried wrapping it in code tags and it did not help. It's there in the edit window, but gone in the post...

Edited by Eric
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...