Hur skrivar man... eller går det överhuvudtaget. Kör med vanliga html-kommentarer o det verkar funka, men kan det bli problem?
------------------
Mr Jim
5 svar · 407 visningar · startad av trensare
Hur skrivar man... eller går det överhuvudtaget. Kör med vanliga html-kommentarer o det verkar funka, men kan det bli problem?
------------------
Mr Jim
Jag tror det kan bli problem. Och har man en inkluderad CSS-fil så funkar det inte. Då är det bättre med:
/* Detta är en kommentar */
------------------
/Erik
www.juhlin.nu /sk8files/ /mp2d/
Söndagen den 3 juni kommer webForum-servern att tas ner för systemunderhåll.
Avbrottet kommer att ske under dagtid. För uppdaterad information se Serverstatus.
Alltså...
<STYLE TYPE="TEXT/CSS">
<!--
A:link { text-decoration: none; color: #666666 }
A:visited { text-decoration: none; color: #666666 }
A:active { text-decoration: none; underline: #000000 }
A:hover { text-decoration: none; color: #000000 }
A.type1:link { color:#FFFFFF; text-decoration:none; }
A.type1:visited { color:#FFFFFF; text-decoration:none; }
A.type1:active { color:#FFFFFF; text-decoration:none; }
A.type1:hover { color:#FFFFFF; text-decoration:overline underline; }
-->
</STYLE>
/* kommentaren här */
------------------
Mr Jim
CSS-filen skall inte innehålla några element (taggar)
filnamn.css
A:link { text-decoration: none; color: #666666 }
A:visited { text-decoration: none; color: #666666 }
A:active { text-decoration: none; underline: #000000 }
A:hover { text-decoration: none; color: #000000 }
A.type1:link { color:#FFFFFF; text-decoration:none; }
A.type1:visited { color:#FFFFFF; text-decoration:none; }
A.type1:active { color:#FFFFFF; text-decoration:none; }
A.type1:hover { color:#FFFFFF; text-decoration:overline underline; }
/* och en liten kommentar */
Däremot tillåter standarden html-kommentarer: <!-- ... --> för att gömma CSS-koden i gamla webbläsare, men de fyller ingen funktion som kommentarsavgränsare.
------------------
/ J