I have a problem with firefox when i set <body style="margin-top: 0px"> it works fine with explorer but in case of firefox it does not set margin 0px from the top. Is there any other option for firefox?
The problem isn't with Firefox, it's with your markup. Post your markup, including your CSS, so that we can have a look.
It could be because you're missing the semi-colon, although I've just made a quick test and on modern browsers it doesn't seem to have any difference. Anyway, Inline CSS is horrible. You should just add the following to your stylesheet: body { margin: 0; } Code (markup):
There is only one property so its not the matter of semi-colon? Anyway thanks for all replies. I found the mistake.
The semi-colon only applies if it's being followed by another property.. e.g. <body style="margin-top: 0px; background: black">
Intriguing. Been freelancing for a little over 2 years always thought an inline style always had to be accompanied with a semi-colon. Cheers pal
Quite like PHP then which will also always execute it's last statement without a semi-colon! <?php echo "my text" ?> PHP: