Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie: IE won't load linked stylesheet?

Status
Not open for further replies.

johnnygeo

Programmer
Apr 23, 2003
125
US
I made a nice little webpage with a linked stylesheet and it works fine in Mozilla Firebird, but IE is ignoring the stylesheet and I can't see what's wrong. Here's what the code looks like:

<html>
<head>
<title>IE .css test</title>
<link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;mystyle.css&quot;>
</head>
<body>
unformatted text<br><br>
<mystyle>formatted text</mystyle>
</body>
</html>

And the stylesheet contains:

mystyle {
color: #ff0000;
font-size: 20.0pt;
}

Again, this works fine in Mozilla, with the second line in large red text. But in IE, all the text is unformatted. What have I done wrong?

Thanks,
Stu Greene
 
either this is some funky technique for developing your own html tags or: <mystyle>formatted text</mystyle>
should read <span class=&quot;mystyle&quot;>formatted text</span>. Make your style look like this also:

Code:
.mystyle {
  color: #ff0000;
  font-size: 20.0pt;
}

Styles need to be applied to existing HTML tags. You cannot create new HTML elements unless you work for th W3C

MrBelfry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top