/    Sign up×
Community /Pin to ProfileBookmark

what is the equivalent of leftmargin="0" topmargin="0"

hi,

what is the equivalent of leftmargin=”0″ topmargin=”0″ that goes in the body tag in css as this does not work in mozilla fireworks,

thanks a lot

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@GlennCarterOct 19.2004 — You mean like this:

<style>

body {

margin-left: 0px;

margin-top: 0px;

}

</style>

This should work in Firefox and Moz.
Copy linkTweet thisAlerts:
@DaveSWOct 19.2004 — if you want to set all margins to 0 you can use the shorthand:

<style type="text/css"><!--

body {

margin: 0;

}

--></style>

Note the type attribute in the style tags, the comment tag to prevent older browsers printing the code to the screen, and the lack of units for the 0, since 0px is the same as 0em is the same as nothing...

[i]Edited to remove coding error[/i]
Copy linkTweet thisAlerts:
@pawkyOct 20.2004 — [i]Originally posted by DaveSW [/i]

[B]

<style type="text/css"><!--

body {

left: 0;

}

--></style>

[/B]
[/QUOTE]


umm.. maybe im missing something, but why left: 0? shouldn't it be margin: 0; ?
Copy linkTweet thisAlerts:
@reh3363Oct 20.2004 — [i]Originally posted by pawky [/i]

[B]umm.. maybe im missing something, but why left: 0? shouldn't it be margin: 0; ? [/B][/QUOTE]


yeah I thought that attribute was supposed to be used with absolute and relative positioning.
Copy linkTweet thisAlerts:
@DaveSWOct 20.2004 — oops deleted the wrong bit when editing Glen's code...

I'll edit it now in case someone tries to copy & paste.
Copy linkTweet thisAlerts:
@pawkyOct 20.2004 — [i]Originally posted by DaveSW [/i]

[B]oops deleted the wrong bit when editing Glen's code...



I'll edit it now in case someone tries to copy & paste. [/B]
[/QUOTE]


lol, ok at least it wasnt me ?
×

Success!

Help @damon2003 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...