Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: css hover

  1. #1
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    2 things I cant get my head round..

    1) I've seen it done on one site where wen u mouse over a link the text has a dotted underline. What is the piece of code i need to incorprate with the rest of my css ?

    2) I want to make my cells highlight on mouse over I have been told its done with a combination of css and Javascript.. So any ideas?

    thnx
    Dream like you'll live forever. Live like you're gonna die 2morrow!

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    735
    Member #
    1935
    2)
    <td onMouseOver="this.bgColor='#cccccc';" onMouseOut="this.bgColor='#rgrtrg';" bgColor="#rgrtrg">text</td>
    This is only javaScript. there is no CSS involved

  4. #3
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    cheers buntine o why arent u on msn ? u busy ?
    Dream like you'll live forever. Live like you're gonna die 2morrow!

  5. #4
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Originally posted by buntine
    2)
    <td onMouseOver="this.bgColor='#cccccc';" onMouseOut="this.bgColor='#rgrtrg';" bgColor="#rgrtrg">text</td>
    This is only javaScript. there is no CSS involved
    Technically it's both: it's using Javascript to access CSS properties.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  6. #5
    Senior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    735
    Member #
    1935
    actually, no it isnt! this.bgColor is javaScript

  7. #6
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    would it be possible to make that whole cell a link? o and any ideas about the first question i asked ?
    Dream like you'll live forever. Live like you're gonna die 2morrow!

  8. #7
    Senior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    735
    Member #
    1935
    remember, background-color: #cccccc; is CSS this.bgColor is just JS

  9. #8
    Senior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    735
    Member #
    1935
    1)
    a {
    background: transparent;
    text-decoration: none;
    border-bottom: 1px solid #fff;
    color: #37A4CC
    }
    a:hover {
    background: transparent;
    text-decoration: none;
    border-bottom: 1px dashed #1D85AB;
    color: #333
    }

  10. #9
    Senior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    735
    Member #
    1935
    oh and kirman, about making the whole table cell a link. You could use js to redirect the page when someone clicks on the cell.

    <td onClick="window.location='page.html';">sfs</td>

    sorry about all the posts...

  11. #10
    Member
    Join Date
    Dec 2005
    Location
    Canvey Island, Essex, UK
    Posts
    67
    Member #
    12033
    Quote Originally Posted by buntine
    2)
    <td onMouseOver="this.bgColor='#cccccc';" onMouseOut="this.bgColor='#rgrtrg';" bgColor="#rgrtrg">text</td>
    This is only javaScript. there is no CSS involved
    This doesnt seem to work in Firefox, is there a workaround for this?

    EDIT: It does seem to work in FF, however, it doesnt work if i add the code that was mentioned above about making a whole cell act as a link. Is there a workaround for this lol.

    My mistake :nervous:
    Matthew Stocker
    (X)HTML, CSS, PHP & JavaScript Developer


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:50 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com