Jump to content
Stef's Coding Community
edoplaza

Add link to a background image

Recommended Posts

Hello everybody,

 

In this site I created:

 

ww w.sdacon sultores.com

 

the logo at the top left corner is a background image. Is it possible to add a link to it, just like in a regular image?

 

Regards,

 

Eduardo

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Unfortunately, for me on a MAC in Safari, Firefox and Opera, that pushes the Sinergia Aprendizaje Desarolla out of the header and down over the text. Just checked on the PC and it does the same thing.

Share this post


Link to post
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;*/ }

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
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...