How do I write a CSS for mouse hover [duplicate]


Tags: php,html,css

Problem :

Possible Duplicate:
How to use CSS hover inside html-tag?

<body>
   <div id="he">
      <div id="header">
         <div class="headertabs">
            <ul class="nav">
               <li class="divide">&nbsp;</li>
               <li class="tab"><a href="a.php">OVERVIEW1</a></li>
               <li class="divide">&nbsp;</li>
               <li class="tab"><a href="a.php">OVERVIEW2</a></li>
</body>

How do I write a css when I move the mouse (hover) on the overview1 and overview2 tabs it has to change its text color to green.



Solution :

Simnply use the :hover pseudo selector:

li.tab a:hover
{
   color: green
}

http://jsfiddle.net/Kyle_/duj2d/


    CSS Howto..

    Selenium: How to get text from within an html tag which has another tag in it

    How to change the scrolling text in CSS or JQuery

    How to have a DIV appear after you hover over an image/link/another div?

    How to create custom border style in JavaFX CSS?

    How can I change the css properties of a google visualization table and it columns?

    How to style a 3rd-party iFrame [duplicate]

    How to add css for specific input type text

    How to center a button WITHOUT a div using CSS

    How to override CSS Box Sizing for just one area on page?

    How do I fix this simple CSS floating issue in IE?

    How to optimize an image sequence in Chrome?

    How to make a image stay at the bottom but not rise up

    css “background-image” shows unwanted border, img “src” does not

    How can I convert an svg-glyph into a path?

    How can I add CSS to a form in Rails when the form is rendered in two different locations?

    How to slide content opening up with jquery

    How to create a caption for a pure CSS/HTML Slider with thumbnails, no java/jquery

    How to set height of child div while hovering over a parent div in css?

    How to turn off carousel when resized?

    How to apply styles to a group of Labels in javafx without css

    How to split css shape in half vertically?

    CSS: How to get an animated gif background-image on top of a div

    How do I set css using jQuery .css after a period of time?

    How to apply CSS class on current element using jQuery

    How to add text under every image?

    how to to set chat box based on user id using css

    How to change underline thickness of an a-tag without using border?

    How to highlight a currently selected item/section in Wordpress with CSS (maybe PHP too)?

    Create template page for showing jpg's from direct links [closed]

    How to minify HTML with CSS and Javascript? [closed]