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 trialVasanthan Ravindran
468 PointsQuestion on styling Headers
You are setting the margins and padding with pixels instead of the percent. Will it work correctly in a mobile environment if it is specified in the px.
4 Answers
Vasanthan Ravindran
468 PointsYou are setting the margins and padding with pixels instead of the percent. Will it work correctly in a mobile environment if it is specified in the px.
Stefan Vitasovic
13,443 PointsPixel is not a relative but a fixed unit so it will differ from a device to a device. You might wanna try resizing the browser from the smallest to full-screen to see the differences.
Tommy Gebru
30,164 PointsYes , using the measurements pixels and percent should work with the margins and padding properties. Also using a percentage as a value is much more fluid than pixels and would give a better user experience. You will get a chance to experiment in a mobile environment when you reach the "Responsive Web Design and Testing" Lesson
Tommy Gebru
30,164 PointsSelect Best Answer to close the forum post.