Witam
Jak wykonać podświetlanie tak jak na tej stronie po lewej stronie:
http://www.freelayouts.com/
Pozdrawiam
div { background-color: rgb(233,0,0); border: 2px solid rgb(233,0,0); } div:hover { background-color: rgb(255,255,255); }
<?xml version="1.0" encoding="iso-8859-2"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl"> <head> <style type="text/css"> td#c1 { background:green; border:1px solid lightgreen; width:300px; height:50px; } td#c1:hover { background:white; } td#c2 { background:red; border:1px solid pink; width:300px; height:50px; } td#c2:hover { background:white; } td#c3 { background:blue; border:1px solid lightblue; width:300px; height:50px; } td#c3:hover { background:white; } </style> </head> <body> <table> </table> </body> </html>
var agt = navigator.userAgent.toLowerCase(); var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion); var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) ); document.getElementById("c1").onmouseover=function() { if (is_ie6) { document.getElementById("c1").className = "hover"; } } document.getElementById("c1").onmouseout=function() { if (is_ie6) { document.getElementById("c1").className = ""; } }
(...) .hover { background:white; } (...)