?
Solved

CSS baby steps

Posted on 2011-10-13
4
Medium Priority
?
152 Views
Last Modified: 2012-05-12
I am not seeing my CSS applied to my test web page
Here is the html and here is the css
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MY NAME</title>
<link href="./style.css" type="test/css" rel="stylesheet" />

</head>
        <body>

        <h1>My Name</h1>

        <ul>
        <li>  I like school</li>
        <li> I like the movie <a href="http://www.imdb.com/title/tt0057012/">Dr.Strangelove</a></li>
        <li> Here is me when I'm happy: <img src="./images/happy.jpg" alt="Happy" width="160" height="110" />  This is
when I'm 
sad: <img src="./images/sad.png" alt="sad" width="160" height="110" /></li>
        <li>I think that comic sans is the font of choice for all serious business</li>
        </ul>


        <a href="http://validator.w3.org/check/referer"><img src="../w3c-xhtml11.png" alt="Valid XHTML 1.1" /></a>
        <a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="../w3c-css.png" alt="Valid CSS!" /></a>
        </body>
</html>

Open in new window

body {
	background-color: green;
	}
h1 {
	color: red;
	}

Open in new window

0
Comment
Question by:GPicasso
  • 2
4 Comments
 
LVL 6

Expert Comment

by:GregArnott
ID: 36965888
Change this line to:
<link href="style.css" type="test/css" rel="stylesheet" media="all">

Open in new window

The " />" closing this line is only required if you're using the XHTML DOCTYPE - and you've left DOCTYPE out which I believe defaults to HTML 4 transitional.
0
 
LVL 9

Accepted Solution

by:
user_n earned 150 total points
ID: 36973213
You may put your file in wrong folder. I think that style.css should be in current_folder/test/css folder.  Where current_folder is the folder holding the html file
0
 

Author Closing Comment

by:GPicasso
ID: 36974223
Close dude it was just under both our noses
test/css.. lol it should have been text/css
0
 
LVL 6

Expert Comment

by:GregArnott
ID: 36976846
Lol. Copy/paste/presume!

Should have typed it out. Nice pick up
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question