Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Hyperlink a div

  1. #1
    Join Date
    Jun 2007
    Posts
    1,757
    Tokens
    105

    Latest Awards:

    Default Hyperlink a div

    well basically, im making a nav like HabbCrazy.net's, but inorder for the button to show, it needs to be hyperlinked, so i have to hyperlink the whole div if you know what i mean. would it be like this

    <a href="..."><div class="style20" id="buttonid"></div><a>
    Get back imma let my gat go,
    got a itchy finger... imma leave a fat hole.
    - Giggs :: Ruthless Freestyle

    I owe rep to - .:Jack120:. HabbDance

  2. #2
    Join Date
    Feb 2008
    Location
    Plymouth
    Posts
    346
    Tokens
    0

    Default

    Why don't you just make the button then do
    <img src="urlll" />
    I am Bojangles =]




  3. #3
    Join Date
    Aug 2006
    Location
    Manchester, UK
    Posts
    2,016
    Tokens
    141
    Habbo
    florx

    Latest Awards:

    Default

    HTML Code:
    <div onclick="location.href='http://www.example.com';" style="cursor:pointer;">content</div>
    For gods sake google it lol.

    http://almosteffortless.com/2006/05/...v-into-a-link/

  4. #4
    Join Date
    Jul 2005
    Location
    Belgium
    Posts
    2,492
    Tokens
    147

    Latest Awards:

    Default

    Yep, what florx said, thats how I do it, but as I have several divs to be linked I made a external .js file & made the functions in there, then I load in the js in the html (you know, <script language="javascript"> etc..) & then I just do <div class="name" onclick="linkfunction();">

  5. #5
    Join Date
    Mar 2008
    Posts
    927
    Tokens
    0

    Default

    He's a lazy idiot who can't google.

    Edited by jesus (Forum Super Moderator): Please do not insult other members.
    Last edited by jesus; 17-03-2008 at 08:05 PM.

  6. #6
    Join Date
    Jun 2007
    Posts
    1,757
    Tokens
    105

    Latest Awards:

    Default

    Quote Originally Posted by Plux View Post
    He's a lazy idiot who can't google.
    lol, Just because i didn't google, that makes me a lazy idiot. kk, lmao
    Get back imma let my gat go,
    got a itchy finger... imma leave a fat hole.
    - Giggs :: Ruthless Freestyle

    I owe rep to - .:Jack120:. HabbDance

  7. #7
    Join Date
    Mar 2008
    Posts
    927
    Tokens
    0

    Default

    Quote Originally Posted by Gangster View Post
    lol, Just because i didn't google, that makes me a lazy idiot. kk, lmao

    You always post your crap here, it's easy to google a problem.
    But you persist posting here? :S

  8. #8
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by rawritsluke View Post
    Why don't you just make the button then do
    <img src="urlll" />
    Because with divs you can use mouse overs. Well, just add a divname:hover into the css, much easier than javascript etc..

  9. #9
    Join Date
    Feb 2008
    Location
    Plymouth
    Posts
    346
    Tokens
    0

    Default

    Quote Originally Posted by .:Jack120:. View Post
    Because with divs you can use mouse overs. Well, just add a divname:hover into the css, much easier than javascript etc..
    Ahh I didn't read that he wanted it on mouseover
    I am Bojangles =]




  10. #10
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by rawritsluke View Post
    Ahh I didn't read that he wanted it on mouseover
    He didnt, I was just giving a good example of why to use divs instead of image links

Page 1 of 2 12 LastLast

Posting Permissions

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