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

HTML Introduction to HTML and CSS (2016) Make It Beautiful With CSS Select and Style by Class

Border Question?

So, u don't have to create multiple properties border, width etc like they did in csstricks.com?Why is the video syntax different from the website

2 Answers

the property border is shorthand for all of these properties combined. It includes width, color and style, for all 4 borders.

Rohald van Merode
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree seal-36
Rohald van Merode
Treehouse Staff

Hi Mohamud,

The border property is a shorthand property, in the border property you can set the values for border-width, border-style and border-color.

The link to css-tricks that is at the references page shows the same. The reason that the first example includes width and height is to give the box a size. If the box didn’t have any width or height it wouldn’t be able to display the border.

I hope this answered your question.