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
meowls
6,840 PointsHow do you determine what sizes/margin/padding to use?
Hey, everyone! This is a very general question, but one that bothers me constantly: unless you're in a situation where a designer has handed you a PSD and you can inspect it to see what spacing and sizes they've used for everything, how do you determine what padding and margin to use on each individual item, and what size everything should be?
Is it as simple as playing around until you like how it looks? Surely there is a better, more precise way. I feel as if I waste all of my time on this and never get into the more fun parts of CSS. I keep playing around and guessing at font sizes that will look good, or adding/removing margins here and there and padding more padding here and there to see if it gives me the look I want. It feels overwhelming and I feel quite stupid that I am hung up on something like this. I would appreciate any advice!
3 Answers
jason chan
31,009 Pointsmargin is outside space.
padding is inside space.
just use px
px is pixels.
jason chan
31,009 Pointswhat looks good.
jason chan
31,009 Pointshttp://foundation.zurb.com/grid.html you can think of spacing with the grid also.
meowls
6,840 Pointsmeowls
6,840 PointsSorry if I wasn't clear. I know that, but I mean what makes you decide how many px? How much space there should be? Is it just a matter of experimenting with what looks good, or are there ways you can go about determining it in a more effective way?