Search code examples
htmlcsstransitionexpand

How to make a div a link as it transitions in CSS


I have a website template I'm working on http://www.travenwest.com/projects/dev2 and I have a problem with the expanding boxes on the left (those are one of my multiple problems, at least). I want them to be links to other webpages, and I was wondering if there was a way to make the whole box a link as it expanded from 250px to 100%. Currently I just have the 'Hey' set in a basic link <a href="http://google.com>Hey</a> but as I said, I want the whole box to be a link as it expands. Also, I would prefer to keep it in HTML/CSS as I have absolutely no experience in jQuery, JavaScript etc. Thanks.


Solution

  • Just add this at your CSS

    #box a{    
        display:block;
        width:100%;
        height:80px;
        position:relative;
        z-index:1;
        line-height: 80px
    }
    

    DEMO: http://jsfiddle.net/enve/fur5D/1/