Autor Zpráva
Petra z Votic
Profil *
V článku http://www.alistapart.com/articles/alternate/ popisují jak přepínat styly CSS pomocí java Scriptu i v IE prohlížečích. Bohužel mě to funguje jen v Opeře a v IE a Mozille ne. Netušíte někdo kde může být chyba?

Nevím zda tento zápis je dobře - např. DREAMWEAVER tento styl vůbec nevidí.

<link href="alternate.css" title="alternate "rel="alternate stylesheet" type="text/css" />

Kód stránky mám:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="zaklad.css" rel="stylesheet" type="text/css" />
<link href="prefer.css" title="prefer "rel="stylesheet" type="text/css" />
<link href="alternate.css" title="alternate "rel="alternate stylesheet" type="text/css" />

<script language="JavaScript" type="text/JavaScript" src="styleswitcher.js"></script>
</head>

<body>
<h1>Michal je borec</h1>
<h2>Petra je holka</h2>
<h3>Kim je pes</h3>
<ul>
<li><a href="#" onclick="setActiveStyleSheet('prefer');return false;">change style to default</a></li>
<li><a href="#" onclick="setActiveStyleSheet('alternate');return false;">change style to paul</a>
</li>
</ul>

</body>
</html>
Petra z Votic
Profil *
Problém vyřešen
Toto téma je uzamčeno. Odpověď nelze zaslat.

0