Click to See Complete Forum and Search --> : Added margins on firefox/opera


isvaljek
10-24-2007, 09:25 AM
Why is there more margin than specified when browsing with firefox or opera compared to ie that displays the requested 10px top margin?

The page in question is http://www.stjepansvaljek.com/default.aspx

The margin is specified for a topmost table in the document, inline:

<form style="height:100%">
<div>
<table style="margin-top:10px"> ... </table>
...
</div>
</form>

ray326
10-24-2007, 01:28 PM
Start with * { margin:0; padding:0 } in an embedded style sheet.

BrettNooyen
10-24-2007, 02:21 PM
You can go even more in depth with resetting stylesheets too.

Resetting Stylesheets (http://blogs.ittoolbox.com/webdesign/bnooyen/archives/starting-from-scratch-resetting-stylesheets-19785)

LeeU
10-24-2007, 03:29 PM
This (http://www.csschimp.com/the_css_box_model.php) might help to explain the problem.

isvaljek
10-25-2007, 01:57 AM
Start with * { margin:0; padding:0 } in an embedded style sheet.

Thanks, that did the trick. Now I only have to figure out why .

BrettNooyen
10-25-2007, 07:46 AM
If you read the link I posted you could gain some insight as to why... different browsers use different program stylesheets, in which they are different to start with... when you reset all styles initially you are starting from a clean slate