www.webdeveloper.com
Results 1 to 3 of 3

Thread: making a div a link

  1. #1
    Join Date
    Nov 2006
    Posts
    31

    making a div a link

    Hi,

    I have one simple question.

    How can I make a link of an entire <div>? I could place <a> tags around the div, but isn't that onorthodoxe?


    Thanx,

    dille

  2. #2
    Join Date
    Sep 2006
    Location
    Bucharest, RO
    Posts
    940
    You can use Javascript for that.
    Code:
    <div onClick="window.location='newURL'" style="cursor: pointer">
    blah blah
    </div>

  3. #3
    Join Date
    Nov 2006
    Posts
    31
    thanks,

    it works.


    Grtz,

    Dille

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles