December 14, 201213 yr They both have their role; it depends on what you're trying to do. Pixels are more of the "de facto" measurement and percentages are for special situations. If you want something which stays a certain size, then you would use pixels. Many websites never use percentages. However, if you're looking to create a trendy responsive website, then you may often need to use percentages to stretch the content to be proportional to the window (or proportional to the parent div). However, percentages get very tricky to work with very quickly (especially when you try to include horizontal margins, padding, or borders) so I recommend using pixels over percentages whenever you can without sacrificing any functionality.
December 14, 201213 yr I agree with a lot of what Ron said. It really comes down to what you're trying to do. Although, personally, I think %s are the best thing to use for layout at mobile sizes.
Create an account or sign in to comment