Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailemVyřešeno Nefunguje mi CSS2 / CSS3 v IE

Ahoj,

potřebuji radu. Vytvářím webové stránky a v IE9 mi nefunguje nic co se týče CSS2 nebo CSS3. Jde mi o to, že na stránkách mám jeden prvek, a pokud na něj najedu myší, tak se má posunout o pár pixelů doprava. V Chromu to funguje ale v IE ne. Hledal sem všude možně, potíž je v tom, že když najdu web kde to v IE9 funguje a zkopíruji zdrojový kód, následně vložím na stránky a chci vysoušet tak to nefunguje, což podle mě nedává logiku.

Prosím pomocte

Předmět Autor Datum
Nějak jsi zapomněl napsat, co je to za kód.
Wikan 06.02.2013 13:50
Wikan
#divus{ width:200px; height:200px; border:1px soild #eaeaea; background:#eaeaea; line-height:200px;…
raji2 06.02.2013 13:58
raji2
Tak tohle rozhodně žádné posunování nedělá. Něco ti tam chybí.
Wikan 06.02.2013 14:02
Wikan
Omlouvám se, zkopírovala se mi jiná část kódu, a nevšiml jsem si toho. :-| Takže znovu > <style> .p…
raji2 06.02.2013 14:05
raji2
Mně to funguje.
Wikan 06.02.2013 14:12
Wikan
No to je super :/ .. to říkám že to nedává logiku, nevím proč mě to nejde.
raji2 06.02.2013 14:13
raji2
Kde ty stránky máš?
Wikan 06.02.2013 14:15
Wikan
Momentálně nikde, zatím jenom v počítači.
raji2 06.02.2013 14:17
raji2
Máš správně nastavený doctype?
Wikan 06.02.2013 14:18
Wikan
Doufám >> <!doctype html>
raji2 06.02.2013 14:19
raji2
A máš ten kód validní? Protože pokud by byl nevalidní, tak by se IE mohl přepnout do jiného zobrazov…
Wikan 06.02.2013 14:22
Wikan
Tak to nevím, popravdě nejsem úplnej odborník na vytváření stránek. Jak to zjistím ?
raji2 06.02.2013 14:24
raji2
Dej sem kompletní kód.
Wikan 06.02.2013 14:26
Wikan
<style> .picture { filter: grayscale(100%); -webkit-filter: grayscale(100%); -moz-filter: grayscale(… nový
raji2 06.02.2013 14:28
raji2
Nemůžeš mít <style> před <doctype>. Styly bys měl mít uvnitř <head>. nový
Wikan 06.02.2013 14:30
Wikan
Oh děkuju ti :-) Už to funguje ! :) Strašně moc díky, tohle by mě nikdy nenapadlo a už si dám pozor.… poslední
raji2 06.02.2013 14:34
raji2

#divus{
width:200px;
height:200px;
border:1px soild #eaeaea;
background:#eaeaea;
line-height:200px;
margin-left:auto;
margin-right:auto;
margin-top:50px;
font-size:20px;

}

<div id="divus">Div Transition Effect</div>

Tohle je ten příklad z jedné stránky. V IE9 to funguje, ale pokud to vložím do svých stránek, tak to nejde :(

Omlouvám se, zkopírovala se mi jiná část kódu, a nevšiml jsem si toho. :-|

Takže znovu >
<style>
.picture {
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: url(desaturate.svg#greyscale);
filter: gray;
}

.picture:hover {
filter: grayscale(0%);
-webkit-filter: grayscale(0%);
-moz-filter: grayscale(0%);
-ms-filter: grayscale(0%);
-o-filter: grayscale(0%);
filter: url(desaturate.svg#greyscale);
filter: gray;
cursor: pointer;
-webkit-transition: all 500ms ease;
-moz-transition: all 500ms ease;
-ms-transition: all 500ms ease;
-o-transition: all 500ms ease;
-khtml-transition: all 500ms ease;
transition: all 500ms ease;
-webkit-transform: translate(5em,0em);
-moz-transform: translate(5em,0em);
-ms-transform: translate(5em,0em);
-o-transform: translate(5em,0em);
}
</style>

<div class="picture" style="position: absolute; top: 0px; left: 300px;">
<a href="???"><img src="image/yellow.png" width="400"></a>
</div>

<style>
.picture {
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: url(desaturate.svg#greyscale);
filter: gray;
}

.picture:hover {
filter: grayscale(0%);
-webkit-filter: grayscale(0%);
-moz-filter: grayscale(0%);
-ms-filter: grayscale(0%);
-o-filter: grayscale(0%);
filter: url(desaturate.svg#greyscale);
filter: gray;
cursor: pointer;
-webkit-transition: all 500ms ease;
-moz-transition: all 500ms ease;
-ms-transition: all 500ms ease;
-o-transition: all 500ms ease;
-khtml-transition: all 500ms ease;
transition: all 500ms ease;
-webkit-transform: translate(5em,0em);
-moz-transform: translate(5em,0em);
-ms-transform: translate(5em,0em);
-o-transform: translate(5em,0em);
}

</style>

<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title></title>
</head>
<body>
<div class="picture" style="position: absolute; top: 0px; left: 0px;z-index: 4;">
<a href="???"><img src="image/vermogen-fantasy.png" width="400"></a>
</div>
<div class="picture" style="position: absolute; top: 0px; left: 100px; z-index: 3;">
<a href="???"><img src="image/destruction.png" width="400"></a>
</div>
<div class="picture" style="position: absolute; top: 0px; left: 200px;z-index: 2;">
<a href="???"><img src="image/red.png" width="400"></a>
</div>
<div class="picture" style="position: absolute; top: 0px; left: 300px;">
<a href="???"><img src="image/yellow.png" width="400"></a>
</div>

</body>
</html>

Zpět do poradny Odpovědět na původní otázku Nahoru