sfx Posted November 12, 2007 Report Share Posted November 12, 2007 Var man kāds izskaidrok , kapēc nestrādā <li> hovers uz IE. Un nestrādā tieši background-color citas īpašības strādā??? Itkā taču elementāri, bet es jau juuku praataa ... :) <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta name="author" content="sfx"> <title>Untitled 2</title> </head> <style type="text/css"> li:hover { background-color: #000; } </style> <body> <ul> <li> » <a href="#">Lii 1</a></li> <li> » <a href="#">Lii 1</a></li> <li> » <a href="#">Lii 1</a></li> </ul> </body> </html> P.S. Ja kāda muļķiga kļūda, lūdzu nelamājiet :) Link to comment Share on other sites More sharing options...
sfx Posted November 12, 2007 Author Report Share Posted November 12, 2007 Zb, izrādās, ka neiet neviens hovers ar background-color :( Link to comment Share on other sites More sharing options...
bubu Posted November 12, 2007 Report Share Posted November 12, 2007 IE :hover pseido-klasi saprot tikai uz a elementiem. Link to comment Share on other sites More sharing options...
sfx Posted November 12, 2007 Author Report Share Posted November 12, 2007 Zb, izrādās, ka neiet neviens hovers ar background-color :( a:hover - straadaa! Link to comment Share on other sites More sharing options...
sfx Posted November 12, 2007 Author Report Share Posted November 12, 2007 IE :hover pseido-klasi saprot tikai uz a elementiem. tas ir iz ID vai CLASS ? Link to comment Share on other sites More sharing options...
bubu Posted November 13, 2007 Report Share Posted November 13, 2007 Nav tam nekāda sakara ne ar ID, ne ar CLASS. a elements nozīmē <a href="...">xxx</a>. Link to comment Share on other sites More sharing options...
marcis Posted November 13, 2007 Report Share Posted November 13, 2007 (edited) <style type="text/css"> ul li:hover { background-color:#000; } </style> ar neiet? Edited November 13, 2007 by marcis Link to comment Share on other sites More sharing options...
mefisto Posted November 13, 2007 Report Share Posted November 13, 2007 Nē neiet. Cik grūti ir saprast IE :hover pseido-klasi saprot tikai uz a elementiem.. Man likās ka bubu diezgan skaidri izteicās. Protams, ja godīgi, tad tas ir patiesi tikai par IE6, jo IE7 saprot :hover daudz labāk. Labāk izmanto <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta name="author" content="sfx"> <title>Untitled 2</title> <script type="text/javascript"> window.load = function(){ var items = document.getElementById('menu').getElementsByTagName('li'); for ( var i = 0 , item; item = items[i]; i++){ item.onmouseover = function(){ this.className = 'hover'; } item.onmouseout = function(){ this.className = ''; } } } </script> <style type="text/css"> li.hover { background-color: #000; } </style> </head> <body> <ul id="menu"> <li> » <a href="#">Lii 1</a></li> <li> » <a href="#">Lii 1</a></li> <li> » <a href="#">Lii 1</a></li> </ul> </body> </html> (nenotestēju vai strādā .. vajadzētu būt apmēram pareizi) Un, turi fkng <style> iekš to fkng <head> !!!. Link to comment Share on other sites More sharing options...
andrisp Posted November 13, 2007 Report Share Posted November 13, 2007 Man kaut kā liekas dīvaini, ka hovers būs uz visu <li> elemetu, bet klikojamā daļa būs tika <a>. Es ieteiktu taisīt tomēr izstiept <a> elementu pa visu <li> elementu un likt hover uz tā (<a>). Link to comment Share on other sites More sharing options...
sfx Posted November 13, 2007 Author Report Share Posted November 13, 2007 Paldies, viis kaartībā. Vienkārši izmetu tos <li> Link to comment Share on other sites More sharing options...
mefisto Posted November 13, 2007 Report Share Posted November 13, 2007 Ne vai tas bija tik labs risinājums, jo semantiskis menu ir linku saraksts (liste). Link to comment Share on other sites More sharing options...
marcis Posted November 13, 2007 Report Share Posted November 13, 2007 Nē neiet. Cik grūti ir saprast IE :hover pseido-klasi saprot tikai uz a elementiem.. Man likās ka bubu diezgan skaidri izteicās. Jau biju nosvītrojis :) div:hover gan atbalsta :) Link to comment Share on other sites More sharing options...
andrisp Posted November 13, 2007 Report Share Posted November 13, 2007 marcis, nevar būt. IE6 un vecāki atbalsta tikai a:hover. Link to comment Share on other sites More sharing options...
gurkjis Posted November 13, 2007 Report Share Posted November 13, 2007 Whatever:hover http://www.xs4all.nl/~peterned/csshover.html Link to comment Share on other sites More sharing options...
marcis Posted November 13, 2007 Report Share Posted November 13, 2007 Man nav IE6, bet šķiet, ka šis piemērs strādāja ( lapas satura daļa, kur ražotāju logo, jāmainas background krāsai @ hover ) http://pta.lv/lv/brands Link to comment Share on other sites More sharing options...
Recommended Posts