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)
![amin mbarki](https://uploads.teamtreehouse.com/production/profile-photos/9808362/micro_WIN_20180211_13_56_11_Pro.jpg)
amin mbarki
2,110 Pointshi can someone explain this css code plz ?
/************************* Clearfix *************************/
.clearfix:before, .clearfix:after { content: " "; display: table; }
.clearfix:after { clear: both; }
.clearfix { *zoom: 1; }
can someone tell what is the :before for and the *zoom:1 ? thanks you
2 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsThe ":before" selector (more commonly written with two colons, "::before
") creates a pseudo-element as the first child of the otherwise selected element. See this MDN page for more information.
The "zoom" property affects the magnification of an element, and a value of 1 means "no magnification". But note that this property is non-standard and is not recommended for use on production sites Consider using "transform: scale()" (details on this MDN page) instead.
In addition to the non-standard "zoom" property, this code appears to have an issue in the definition of ".clearfix::before" being incomplete.
![Yoke Lee](https://uploads.teamtreehouse.com/production/profile-photos/22108/micro_34074dc.jpg)
Yoke Lee
2,871 PointsIn addition to what Steven said, the * before zoom indicates some CSS hack for .. I think older IE versions (8 or earlier, iirc) So that line *zoom: 1; is only intended to be read by the older IE (rip).