Mixing devices in CSS

When doing responsive projects, I often need to have a percentage margin horizontally, but vertically, I usually don't want to have a percentage, but rather fixed pixels.

Is there any reason why I was going to mix units in my margins and padding like this margin: 10px 10%;

Browser performance? Cross-browser issues?

+3


source to share


1 answer


As long as you maintain a pixel-based vertical orientation and a percentage-based horizontal orientation, you should be fine. Just don't mix the two (at least not within the same element), or you will end up with unwanted effects across the board.



+4


source







All Articles