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

CSS

Andres Chaves
Andres Chaves
3,462 Points

Is ok to style my header element or should I use div ?

Hi,

I am using my header element giving background color style as well as height. This is a good practice or should I create a div within the header and use it as my box container and style it.

Regards,

1 Answer

I'd say your current solution is good practice, though it's hard to know without specific examples.

Unnecessary divs are not pretty