We help IT Professionals succeed at work.

How can I hyperlink my DIV ?  (neither href and onclick are working)

egoselfaxis
egoselfaxis asked
on
For some reason, I don't seem to be able to hyperlink the banner image that I have in my righthand column (which is a DIV with text in it -- NOT an image):

http://www.testmdg.com.php5-21.websitetestlink.com/portfolio/arts-entertainment/

The DIV that I'm trying to link / make clickable is called "#banner_image"

I've tried using regular HREF tags as well as onclick="location.href=" ... but it seems that no matter what I try, .. I can't make the DIV clickable.  Why?  How can I achieve this?

Thanks,
- Yvan



Comment
Watch Question

Your <div class="portfolio"> is covering it, so the click is being registered to that instead of the banner_image.

Try adding these two lines to your style.css file, around line 842 (I've highlighted the new lines)
.banner_image {
    background-color: #F44A2E;
    cursor: pointer;
    min-height: 242px;
    padding: 10px;
    width: 106px;
    position: relative;
    z-index: 100;
}
Oh, by the way, your page loads 17 external Javascript scripts and 7 external stylesheets.  That, plus 11 images make for a lot of HTTP requests for one page.  You may want to try to combine some if you can.

Author

Commented:
You are correct -- your suggestion worked.

Thanks so much!
- Yvan

Author

Commented:
Hmmm .. I just noticed that my "Industries" and "Mediums"  dropdown menus are now appearing underneath the banner image on mouseover.  Any suggestion as to how I can fix that?

- yg

Author

Commented:
Nevermind - I figured it out.  I had to reduce teh width of my porfolio DIV to 580px.

Thanks!
- yg

Explore More ContentExplore courses, solutions, and other research materials related to this topic.