![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 203 Pomógł: 0 Dołączył: 10.06.2004 Skąd: Gliwice Ostrzeżenie: (0%) ![]() ![]() |
Witam,
mam w stronce taki fragment tekstu: Kod <div class="mg_l" onMouseOver="this.style.backgroundColor='#CDE288';" onMouseOut="this.style.backgroundColor='';"><a href="#">...</a></div> i validator wywala taki bład: Error Line 32 column 30: there is no attribute "onMouseOver". <div class="mg_l" onMouseOver="this.style.backgroundColor='#CDE288';" onMouseOut You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead). This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information. How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. Domyślam się że należy zrobić taki sam efekt ale przy użyciu stylów, tylko jak zrobić w stylach, że po najechaniu na div, zmieni sie jego tlo? .mg_l:hover nie działa. -------------------- |
|
|
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 853 Pomógł: 25 Dołączył: 27.08.2003 Skąd: Katowice Ostrzeżenie: (0%) ![]() ![]() |
po pierwsze nie napisales jak masz zdefiniowany doument? html? xhtml? strict? transitional? to kluczowa kwestia
pod rugie, najprawdopodobniej chodzi zeby onmouseout i onmouseover pisac malymi literami... (xhtml) -------------------- "If debugging is the process of removing bugs, then programming must be the process of putting them in..."
sobstel.org |
|
|
![]()
Post
#3
|
|
![]() Grupa: Zarejestrowani Postów: 203 Pomógł: 0 Dołączył: 10.06.2004 Skąd: Gliwice Ostrzeżenie: (0%) ![]() ![]() |
Takie to proste
![]() Dzięki, już jest wszystko OK ![]() -------------------- |
|
|
![]()
Post
#4
|
|
![]() Grupa: Zarejestrowani Postów: 1 086 Pomógł: 8 Dołączył: 10.12.2003 Ostrzeżenie: (0%) ![]() ![]() |
Kolejny przykład zbędnego użycia JS?
Kod .mg_l a { Działa w każdej przeglądarce i nie wymaga włączonego JavaScript.
display: block; bakcground-color: transparent; } .mg_l a:hover { bakcground-color: #cde288; } Ten post edytował Zajec 10.12.2005, 12:41:22 |
|
|
![]()
Post
#5
|
|
![]() Grupa: Zarejestrowani Postów: 156 Pomógł: 15 Dołączył: 13.09.2003 Skąd: London Ostrzeżenie: (0%) ![]() ![]() |
Zajec - zakladasz, ze umiescil tam tylko <a>, a mogl umiescic wiele roznych elementow.
|
|
|
![]()
Post
#6
|
|
Grupa: Przyjaciele php.pl Postów: 7 494 Pomógł: 302 Dołączył: 31.03.2004 Ostrzeżenie: (0%) ![]() ![]() |
A ostatnio właśnie znalazłem sposób na pseudoklasę hover tak aby działała dla każdego elementu pod bardzIEwIEm
whatever:hover |
|
|
![]()
Post
#7
|
|
![]() Grupa: Zarejestrowani Postów: 156 Pomógł: 15 Dołączył: 13.09.2003 Skąd: London Ostrzeżenie: (0%) ![]() ![]() |
mike_mech: właśnie powiększyłeś moją liste IE hacków o kolejny element
![]() Zakładki mi w szwach pękają ![]() |
|
|
![]()
Post
#8
|
|
![]() Grupa: Zarejestrowani Postów: 1 086 Pomógł: 8 Dołączył: 10.12.2003 Ostrzeżenie: (0%) ![]() ![]() |
Cytat(gulldarek @ 2005-12-10 23:32:55) Zajec - zakladasz, ze umiescil tam tylko <a>, a mogl umiescic wiele roznych elementow. I dlatego dałem znak zapytania i kulturalnie wytłumaczyłem :-) |
|
|
![]()
Post
#9
|
|
Grupa: Zarejestrowani Postów: 3 Pomógł: 0 Dołączył: 16.11.2006 Ostrzeżenie: (0%) ![]() ![]() |
Witam
To moj pierwszy post na forum wiec chcialem sie przywitac. I jednoczesnie zadac pytanie. Jeszcze raczkuje w css , robie pierwsza swoja strone. Jest juz na finiszu, tylko pojawily sie problemy z IE :| jednym z problemow jest onmouseover Zrobilem to w xhtmlu w ten sposob: Kod <a class="link" href="index.php?pokaz=domyslna" onmouseover='domyslna.src="menu_04b.jpg"'onmouseout='domyslna.src="menu_04.jpg"'><img height="29" name="domyslna" id="domyslna" src="menu_04.jpg" width="210" align="top" border="0"></a> Dziala pod ff. Pod IE wyskakuje komunikat, ze IE zablokowal aktywna zawartosc strony poniewaz jest niebezpieczna. Czytalem hack podany przez mike_mech , jednak jako, ze css jest dla mnei jeszcze niedostatecznie zrozumialy, to css opisywany po angielsku tym bardziej :| Czy jest jakis sposob by to inaczej napisac, tak zeby dzialalo z MSIE? |
|
|
![]()
Post
#10
|
|
![]() Grupa: Zarejestrowani Postów: 1 086 Pomógł: 8 Dołączył: 10.12.2003 Ostrzeżenie: (0%) ![]() ![]() |
Przede wszystkim w drzewie DOM nie ma czegoś takiego jak "domyslna". Odwołuj się do elementów w dokumencie przez np. id.
Kod document.getElementById('identyfikator').src='blabla'; Zauważ, że wielkość liter (np. w getElementById) jest istotna. |
|
|
![]() ![]() |
![]() |
Aktualny czas: 19.08.2025 - 09:09 |