Autor Zpráva
dragon
Profil
Ahoj.

líška mi nechce akceptovať externý css prečo? V čom môžem mať chybu?

Ďakujem.
habendorf
Profil
1) zkus ve ff zmáčknout ctrl+F5
2) pokud nepomůže, musíš nám ukázat kód, jinak budeme jen hádat
Honza Hučín
Profil
Pošli sem kus HTML kódu, ve kterém načítáš externí CSS.
dragon
Profil

<link rel="stylesheet" type="text/css" href="css/style1.css" title="blue">
<link rel="alternate stylesheet" type="text/css" href="css/style2.css" title="dark">
<link rel="alternate stylesheet" type="text/css" href="css/style3.css" title="green">
<link rel="alternate stylesheet" type="text/css" href="css/style4.css" title="gray">
habendorf
Profil
A nebere ani ten základní, ten blue? Ten zápis je fakt v pořádku. Ctrl+F5 jsi zkusil?
dragon
Profil
<a href="#" onclick="setActiveStyleSheet('blue'); return false;">.: blue</a>

<a href="#" onclick="setActiveStyleSheet('dark'); return false;">.: dark</a>
<a href="#" onclick="setActiveStyleSheet('green'); return false;">.: green</a>
<a href="#" onclick="setActiveStyleSheet('gray'); return false;">.: gray</a>
<a href="#" onclick="handleStyleSheet(); return false;"></a>
dragon
Profil
Z každého mi zoberie iba farbu pozadia. :)
habendorf
Profil
dragon: To je ale zajímavá informace - to znamená, že to ten styl najde a načte. A taky to znamená, že chyba je někde uvnitř toho stylu. (a ne ve způsobu volání)
dragon
Profil
Ale IE mi tie CSS-ká plne akceptuje.
habendorf
Profil
Protože IE sežere kdejakou chybu, zatímco ff jede striktně. Např _color:red IE zkousne, ostatní prohlížeče to ignorují. Dá se toho i dobře využít.
dragon
Profil
Mazané :)
dragon
Profil
Takže stačí ak tam budem mať čo i len jednu chybu a od tohu riadku v CSS mi to Firefox brať nebude?
habendorf
Profil
To zas ne, ff nevezme jen tu jednu deklaraci, které nubude rozumět. Hoď sem link na ten css soubor, nebo sem dej jeho obsah.
dragon
Profil
body {
font-family:"Verdana",sans-serif;
font-size: 10px;
color:white;
background-color:MidnightBlue;
}


.1 /*velka tabulka ohranicuje vlastne stanku*/
{
font-family:"Verdana", sans-serif;
font-size: 10px;
color: white;
border-style:solid;
background-color: lightsteelblue;
width:764px;
height:760px;
border-color: white;
table-layout:fixed;
margin-bottom:50px;
}

.2 /*tabulka v ktorej sa nachadza dragon*/
{
font-family:"Verdana",sans-serif;
font-size: 10px;
color:white;
border:1px;
border-style:solid;
border-color:white;
background-image: URL('../back/w.png');
width:744px;
height:120px;
margin-bottom:6px;
table-layout:fixed;
}

.3 /*tabulka v ktorej je menu*/
{
font-family:"Verdana",sans-serif;
font-size: 11px;
color:white;
border:1px;
border-style:solid;
border-color:white;
background-color:steelblue;
width:100px;
height:1008px;
table-layout:fixed;
margin-right:3px;
}



.4 /*samotny text*/
{
font-family:"Verdana",sans-serif;
font-size: 10px;
color:white;
border:1px;
border-style:solid;
border-color:white;
background-color:steelblue;
width:638px;
height:974px;
table-layout:fixed;
text-align: justify;
}

.box /*tabulka.box v ktorej sú farby*/
{
font-family:"Verdana",sans-serif;
font-size: 10px;
color:white;
border:1px;
border-style:solid;
border-color:white;
border-collapse:collapse;
background-color:steelblue;
width:638px;
height:25px;
margin-bottom:5px;
table-layout:fixed;
vertical-align:middle;
}


td a.red /*bunka, meniaca sa red*/
{
width: 100%;
height: 100%;
text-align: center;
background-color: steelblue;
line-height:25px;
}

td a.red:hover
{
background-color: rgb(105,165,224);
color:white
}

td a.orange /*bunka meniaca sa, orange*/
{
width: 100%;
height: 100%;
text-align: center;
background-color: steelblue;
line-height:25px;
}
td a.orange:hover
{
background-color: rgb(105,165,224);
color:white
}

td a.yellow /*bunka meniaca sa, yellow*/
{
width: 100%;
height: 100%;
text-align: center;
background-color: steelblue;
line-height:25px;
}
td a.yellow:hover
{
background-color: rgb(105,165,224);
color:white
}


td a.green /*bunka meniaca sa, green*/
{
width: 100%;
height: 100%;
text-align: center;
background-color: steelblue;
line-height:25px;
}
td a.green:hover
{
background-color: rgb(105,165,224);
color:white
}

td a.blue /*bunka meniaca sa, blue*/
{
width: 100%;
height: 100%;
text-align: center;
background-color: steelblue;
line-height:25px;
}
td a.blue:hover
{
background-color: rgb(105,165,224);
color:white
}


a {text-decoration: none}

a:link {color:white}

a:visited {color:white}

a:active {color:white}

a:hover {color:orange;
text-decoration: none}
habendorf
Profil
takže
1) vyhoď uvozovky z verdany, nemají tam co dělat
2) nejsem si jist, ale třída asi nesmí začínat číslicí, takže z .1 si udělej třeba .a1
3) to už jen navíc, problém to nezpůsobuje - v css je dědičnost, takže nemusíš všechno dokenonečna opisovat - na body dáš font-family:verdana,sans-serif; a dál to všude vymaž. A stejně i další deklarace.
dragon
Profil
Super. Funguje to! Chyba bola v tom, že tie triedy sa nemôžu začínať číslicou. To by ma nikdy nenapadlo.

Vrelá vďaka.
Toto téma je uzamčeno. Odpověď nelze zaslat.

0