Jump to content

making the menu change color when your mouse is over an menu item


MadFly

Recommended Posts

making the menu change color when your mouse is over an menu item
is I think, the same as the term "rollover''I am all new to HTML and can not give you the answer as to how, but I know the ''rollover'' topic is included in the tutorials. I am sure if you look up the topic, you could find your solution.Good luck!
Link to comment
Share on other sites

is I think, the same as the term "rollover''I am all new to HTML and can not give you the answer as to how, but I know the ''rollover'' topic is included in the tutorials. I am sure if you look up the topic, you could find your solution.Good luck!
hi,you need to set 2 different styles in your sheet, one for element 'a', and one for 'a:hover'. if you just want the colour to change, just set a different color value in each styleI don't use the <menu> tag myself but am confident this works
Link to comment
Share on other sites

The menu element was deprecated in HTML 4.01 and is not supported in XHTML 1.0.If you want the color of each item to change when the mouse is over, just do this:

li a {display: block; /* This will make the hover of the link fit the whole <li> element */background-color: white;}li a:hover {background-color: red;}

Some people would say to put the :hover on the <li> element, but this doesn't work in Internet Explorer 6. I also highly recommend a Strict DTD (XHTML 1.0 Strict or HTML 4.01 Strict), because CSS will only work predictably with those kind of DTDs.I personally recommend HTML over XHTML, because most likely, the day your site is displayed with an XHTML MIME type it won't render because of XML errors (Things like "<" and "&&" in your scripts and other things).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...