Results 1 to 3 of 3

Thread: Guys, getting headache with this problem -> when mouseover text and it changes color!

  1. #1
    Join Date
    Jan 2007
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry Guys, getting headache with this problem -> when mouseover text and it changes color!

    I think I have assigned and use my CSS in a wrong way.
    See this
    : http://www.coffeesociety.co.th/facilities.htm
    Rollover the text and it changes the color. Pretty bad.
    It did not happen before, until the day that new versions of browsers were released.


    This is the code:

    Code:
    .verdana11normalwhite {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size: 11px;
    	font-weight: normal;
    	color: #FFFFFF;
    	text-decoration:none;
    }
    .verdana11normalwhite:hover {
    
    	color: #CE8B00;
    	text-decoration: none;
    }
    this is the html:

    HTML Code:
    <div align="left" class="verdana11normalwhite">
    <p><strong>Coffee Society Silom </strong> invites you to explore our four levels and four experiences, each level having a unique personality to suit your mood:</p>
    <p align="left"><strong>Our ground level </strong> is an open area featuring a towering Swiss clock that explodes through the ceiling and up to the third level.  It's a great area to sit and chat, read a newspaper or magazine, surf using our free high-speed wireless Internet access on your laptop, or watch (or be watched by!) the throng of interesting people passing by through the floor-to-ceiling window.  Also enjoy<br>alfresco dining and a dessert and a smoke on our large outdoor patio facing Silom Road.
    </p><div>

    Of course I assigned
    Code:
    .verdana11normalwhite:hover {
    
    	color: #CE8B00;
    	text-decoration: none;
    }
    because sometimes I need to use class:verdana11normalwhite with a link which a link should change the font color when it is mouseovered. but this turn out to be a normal paragraph text change the color when mouseovered.


    Could anyone suggest what is the right way to avoid this problem?
    Should i avoid giving class to <DIV> and use <span> instead or? what is a better tag for this?


    Thank you in advance!

  2. #2
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    Try
    Code:
    a.verdana11normalwhite:hover {
    	color: #CE8B00;
    	text-decoration: none;
    }
    The "a." tells it that it only applies to anchor tags (hyperlinks)
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  3. #3
    Join Date
    Jan 2007
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you!!!
    It works

Bookmarks

Posting Permissions

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