When creating a responsive website, I use percentage values for most width and height declarations.
How about padding and margin – is it ok to use px values there or should I also use percentages?
That both works is pretty clear, I am just concerned that some strange behavior of mobile phones (auto zoom or whatever, I don’t know) messes something up.
pxis almost never the best answer. If by “percentages” you mean.5em, yes, that’s usually best.But device manufacturers have taken to lying to the browser about everything, so nothing will replace testing on the actual devices. As usual.
(Example: the iPad Mini has a physically smaller screen than the iPad, so you want to use bigger type; but there’s no way for your code to detect that it’s a Mini. Sigh.)