0

So I'm going through web design more in detail and by all means the text in my page should be size 20. I don't want to use html tags or javascript to make the text size 20. I want to use css. For some reason my index.html file
http://obesechickenapps.com/myhomepage/

<html>
<head>
<link type="stylesheet" rel="text/css" href="stylesheet.css" />
<!--<style>
p{  font : 20pt Arial,geneva,helvetica;}
</style>-->
</head>
<body>
<p>left</p>
<p>middle</p>
<p>right</p>
</body>
</html>

does not pick up on the css styling in http://obesechickenapps.com/myhomepage/stylesheet.css

p{  font : 20pt Arial,geneva,helvetica;}
a{  font : 20pt Arial,geneva,helvetica;}

When I put the styling in inline style tags then everything works. I'm so confused... My text does show up as 20pt font Arial.

Why does the css for this page work: http://obesechickenapps.com/3ColumnsExample/sample3ColumnsPageCss.html but the first link I used did not?

TL;DR help with linking css stylesheets and html please.

I hate screen readers

4

1 回答 1

1

Fixed:

<link rel="stylesheet" type="text/css" media="screen" href="stylesheet.css" />

HTML and CSS are real funny when it comes to the <link> property, if even one thing is wrong, the stylesheet won't load at all.

于 2013-05-05T03:43:59.890 回答