Thanks to Richard Grevers I've solved this problem. But then pop out another one. As you can see here submit button should have margin-left about 72px (with 13px default font-size for submit buttons) and it has, but only in Opera. In Chrome it looks good, but "Inspect this element" shows 73px, so 1px from...? In Firefox the difference is visible even without Firebug.

2 answers

0
points
This was chosen as the best answer

Can I suggest that you margin the containers of the form elements.

e.g. just margin the paragraph that contains the submit button - it's more reliable cross browser, as form elements like input are generally rendered by the operating system not the browser.

try

.submit 
{
margin-left: 4.5em;
}
Answered 11 months ago by Tony Crockford
Emily G 625
1
point

Rounding error or the browsers/operating systems may be using different fonts.

If you want the left margin to be 72px then set it to 72px. You will never get that fine of control using ems.

Answered 11 months ago by Emily G
  • I've recently read that em based sites are bette for scalling etc. so I would like to stick with ems... KORraN 11 months ago
  • But what you gain in scalability, you lose in precision. I usually use a mixture of em and px. Emily G 11 months ago
Log in to post your answer