Laying out your divs


#1

https://www.codecademy.com/courses/web-beginner-en-9x6JW-WnAFv/0/2?curriculum_id=50579fb998b470000202dc8b

When I run my code I get the error message "Did you create a

with an ID of 'header'?"

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title></title>
	</head>
	<body>
        <div class="header"></div>
        <div class="left"></div>
        <div class="right"></div>
        <div class="footer"></div>
	</body>
</html>

#2

you gave your header a class, not an id


#3

Any help would be greatly appreciated . Thanks :slight_smile:


#4

When I change the code from 'class' to 'id' I get the error message: "Oops, try again. Did you create a

with a class of 'left'?"

#5

can i see the change?


#7

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title></title>
	</head>
	<body>
        <div id="header"></div>
        <div id="left"></div>
        <div id="right"></div>
        <div id="footer"></div>
	</body>
</html>

#8

no, your header and footer should have an id, your left and right should be classes

Yes, you can give id to one element, and class to another. Not all have to be class, or all id


#9

Thanks. I will try this now (code above)
(Updated) The code is now working, thanks for the help