css link tag

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
mickd
Forum Contributor
Posts: 397
Joined: Tue Jun 21, 2005 9:05 am
Location: Australia

css link tag

Post by mickd »

hi, i was wondering why when i use

<link rel="stylesheet" href="style1.css" type="test/css" />

the css doesnt load (as if there was no css at all)

while

include 'style1.css';

works.


thanks any help appriciated.
pilau
Forum Regular
Posts: 594
Joined: Sat Jul 09, 2005 10:22 am
Location: Israel

Post by pilau »

Because it should be type="text/css", not test.
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

pilau wrote:Because it should be type="text/css", not test.
he must've thought since it is a test of css it should be test/css, muahahahaha :lol:
mickd
Forum Contributor
Posts: 397
Joined: Tue Jun 21, 2005 9:05 am
Location: Australia

Post by mickd »

oops it was text, mistyped it when i wrote it here because ive been using include instead of link as link doesnt appear to work so i didnt copy paste it.
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

are you testing it using IE, if yes this a very often found IE's CSS bug in which it doesn't recognise the first element of the CSS. put some bluff element on the top and then see if it works.
Post Reply