Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

linking div's

  • 21-11-2005 01:16AM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 12,027 ✭✭✭✭Giblet


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


  • Registered Users, Registered Users 2 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, Registered Users 2 Posts: 12,027 ✭✭✭✭Giblet


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


  • Registered Users, Registered Users 2 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, Registered Users 2 Posts: 2,206 ✭✭✭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, Registered Users 2 Posts: 8,488 ✭✭✭Goodshape


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


Advertisement