Reputation: 85
When doing responsive designs I often need to have a percentage margin horizontally, but vertically I usually don't want to have percentage, but rather fixed pixels.
Are there any reasons why I shouldn't be mixing units in my margins and paddings like this:
margin: 10px 10%;
Browser performance? Cross browser rendering issues?
Upvotes: 4
Views: 1737
Reputation: 490
As long as you're maintaining that vertical is pixel based and horizontal is percentage based, you should be fine. Just don't mix the two (at least not within a single element), or you'll get undesired effects across the board.
Upvotes: 4