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

Design

Help with responsive web design on converting padding from pixels to percentages

Hi there,

I just had a quick question on a responsive web design issue. I am creating a fluid foundation for my website and have made scalable images, converted typography from pixels to percentages, and converted my grid and margins from pixels to percentages, but I'm not quite sure if I need to do this with my padding. Any ideas?

2 Answers

Patrick Metcalfe
PLUS
Patrick Metcalfe
Courses Plus Student 7,563 Points

To be a fluid design the padding must be dynamic, either with em, vw, rem etc. However albeit the definitions, having dynamic padding isn't necessary. I think you should see how it looks on different sizes and decide yourself. For example if you were using padding on modules then maybe dynamic padding would be best, but if you were working with imgs and collapsibles then you might decide that fixed padding is better. Just trust your judgement, because implementing a fluid design is beneficial for all parties, but implementing dynamic padding is more of an aesthetic decision that the designer must make with the end user in mind. That's how I usually go about these types of design decisions, with a user-centric focus.

Thanks, that was a great answer!