Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Danielle Palombo](https://uploads.teamtreehouse.com/production/profile-photos/2840502/micro_pic_of_Danielle2.jpg)
Danielle Palombo
Front End Web Development Techdegree Student 10,421 PointsClearfix in the Header
I am having trouble with the challenge question about adding the clearfix class to the main header element. I added class="group" to the <header class="main header"> element. what am I doing wrong?
<!DOCTYPE html>
<html>
<head>
<title>Floats</title>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="main-wrapper">
<header class="main-header">
<h1 class="main-logo"><a href="#">My Work</a></h1>
<ul class="main-nav">
<li><a href="#">Design</a></li>
<li><a href="#">Coding</a></li>
<li><a href="#">Writing</a></li>
<li><a href="#">Hire Me!</a></li>
</ul>
</header>
<div class="primary col">
<h1>I'm a Designer</h1>
<p>I design beautiful user interfaces, then bring them to life with HTML, CSS, and JavaScript. I love including personal photographs of nature, people and everyday things in my designs.</p>
<p>If you need a front-end designer for your next project, <a href="#">take a look at my work</a>, then <a href="#">get in touch</a>!</p>
</div>
<div class="secondary col">
<h2>I Also Write</h2>
<p>I like teaching others about the latest web in technology. So when I'm not designing or coding websites & apps, you'll find me writing <a href="#">articles for my blog</a>.</p>
</div>
<div class="extra">
</div>
</div>
</body>
</html>
/* Complete the challenge by writing CSS below */
/* Float Styles
================================ */
.main-logo,
.main-nav li {
float: left;
}
/* Float Clearfix
================================ */
.group:after {
content: " ";
display: table;
clear: both;
}
.
![Danielle Palombo](https://uploads.teamtreehouse.com/production/profile-photos/2840502/micro_pic_of_Danielle2.jpg)
Danielle Palombo
Front End Web Development Techdegree Student 10,421 PointsIn the CSS, the class is .group for clearfix. When I added class="group" in the html <header> it said it was wrong.
![Danielle Palombo](https://uploads.teamtreehouse.com/production/profile-photos/2840502/micro_pic_of_Danielle2.jpg)
Danielle Palombo
Front End Web Development Techdegree Student 10,421 PointsThank you, that worked!!
![texas2010](https://uploads.teamtreehouse.com/production/profile-photos/1810892/micro_svgA637643274572862.jpg)
texas2010
27,101 PointsWelcome, good thing is I took that course before. lol
1 Answer
![texas2010](https://uploads.teamtreehouse.com/production/profile-photos/1810892/micro_svgA637643274572862.jpg)
texas2010
27,101 Points<header class="main-header group">
that is what i did. it is suppose to do that
texas2010
27,101 Pointstexas2010
27,101 PointsUmm. I don't see group on any class. maybe that is problem when you forget to add group on class?