Css not working in HTML

Css not working in HTML
0

#1

Hello freecodecamp,

This is my first attempt at coding. I’m just making a webpage using texteditor. But for some reason my css element isn’t updating in the browser. When I view the source code through my browser, the link to my css is there, as well as the rest of my html file. So I’m thinking my problem may lie in the css file?

I have both files saved into one folder, index is the title of my html document, and style.css is the name of my css.

I have enabled plain text, not rtf format.

this is my html:

<html> 

<head>
	<title>my website</title>
	<link rel=“stylesheet” type=“text/css” href=“style.css”/>
</head>

<body>
<div id=“container”>
	<div id=“header”>
	<h1>my website</h1>
</div>
	<div id=“content”>
		<div id=“nav”>
		<h3>navigation</h3>
		<ul>
			<li>home</li>
			<li>about</li>
			<li>contact</li>
		</ul>
	</div>
		<div id=“main”>
			<h2>home page</h2>
			<h2>home page</h2>
		<p> asjkahsdaskaskhda</p>
		<p> sjakjshdakjsdhahka</p>
		<p> asjdhaskhdashdkas</p>
		
		</div>
	<div id=“footer”>
		copyright &copy; 2016
	</div>	
</html>



this is my css: 

body {
	background-color: #EEE;
}

#container {
	background-color: white;
	width: 800px;
	margin-left: auto;
	margin-right: auto;
}

#header {
	background-color: #66CCFF;
	color: white;
	text-align: center;

}

hoping someone could chime in :slight_smile:


#3

Like P1xt said, the very first div on line 9 that didn’t get closed, body didn’t get closed either, (Good habits to be in but not necessary with some other hands at work)


#4

thank you, your input was really helpful. I didn’t realize there was a difference between the quotation marks. But it’s odd, because I thought I modified textedit from rtf to plain text.

anyway decided to download textwrangler and use that for now.

I’ll be more careful with closing out items, in fact I’m just going to build them from the start, and then input the details/parameters after

This was my first attempt, and I learned some lessons :slight_smile: