Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

linking div's

Options
  • 21-11-2005 2:16am
    #1
    Registered Users Posts: 8,488 ✭✭✭


    I want to make an entire div area into one big href.

    Exactly what you get in Firefox when you put 'a' tags on either side of a DIV, but I'd prefer something that works in IE and doesn't send the validator into a hissy fit.

    Anyone know how or if it's possible?

    Cheers.


Comments

  • Registered Users Posts: 11,981 ✭✭✭✭Giblet


    Make the div you want, and do this, <a href = "" class="div name">


  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    You mean mark out the css rules for the div and assign them to an 'a href'?

    If that's it it's not really as versitile as I hoped but I might be able to adapt, cheers.


    view this in firefox and you'll know what I'm trying to achieve.


  • Registered Users Posts: 11,981 ✭✭✭✭Giblet


    Look at the links at the bottom of this site.
    http://www.tgump.com/site/


  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    All well and good but I've got line breaks and font resizes which can't really be put between two anchor tags. The example on that site is essentially just a very large border.


    edit -- forget that actually.. it seems to work alright. Cheers :)


  • Registered Users Posts: 2,157 ✭✭✭Serbian


    Goodshape wrote:
    All well and good but I've got line breaks and font resizes which can't really be put between two anchor tags. The example on that site is essentially just a very large border.


    edit -- forget that actually.. it seems to work alright. Cheers :)

    You could use JavaScript for this.
    <div class="someclass" onclick="location.href='somepage.htm'">Div Content</div>
    

    I would also recommend you add: cursor: pointer; to the CSS class for the div so it looks like a link.


  • Advertisement
  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    Serbian wrote:
    You could use JavaScript for this.
    And I will. Work's great - cheers Serbian.


Advertisement