Jump to content

Linking From A Background Image In Css


billydocks

Recommended Posts

Hello everyone,I am brand new to this, as may already be evident from the wording of my thread title. After some reading and practice, I am fairly confident on the basics of CSS and XHTML, and I am wanting to push myself a little. In the website I am creating for my own practice sake, I have an external CSS page which is working satisfactorily for basic things around the website. Now I'd like to see if I can make certain sections of the background image to be links to other pages, instead of the HTML navbar I have created. So if I want different sections or elements of the background image to link to other pages on the website, is there a way to do this? If this is written into external CSS, then it should be the same site-wide, correct? Perhaps I am biting off more than is helpful for me to chew at the moment. Any suggestions/corrections are welcome.Thank you for your time. It is much appreciated.

Link to comment
Share on other sites

A background image doesn't link to anything. An HTML element does. You need the HTML <a> element if you want to link to somewhere. What you can do is have several <a> elements. Use CSS to show only a portion of the background image on each link. Another alternative is to use image maps

Link to comment
Share on other sites

Cheers. The image maps look interesting, I'll look into that.

Use CSS to show only a portion of the background image on each link.
Does this mean I can program sections of the background image to disappear/appear on mouse roll over, or do you mean, using CSS, each page would have only certain portions of the background image visible ? or both, or am I misunderstanding completely?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...