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


Which unit for line width in responsive layouts.

I have a question i never really asked myself. normally i use em as the unit of choice for responsive projects but somehow i never challenged myself about the unit for the line width. if you normally have defined a line like that

    border-top: 1px dotted black;

you tend to forget that the width is also set in pixel even if it is just one single pixel and not a really a layout element altering the flow. but would it be better to change it to em too? for the sake of consistency? best regards r.

1 Answer

"If 0.1em computes to a value that is less than 1px, it may be ignored depending on how the browser chooses to round values. Perhaps it's the case that Firefox and IE round numbers, whereas Chrome floors them. You should probably just use a value of 1px instead of using em."