/    Sign up×
Community /Pin to ProfileBookmark

Margins and padding; IE’s display compare to Firefox’s

While IE displays “padding” (or a “gap”) on the right side of window, Firefox does not; here is a link to my only external stylesheet file: “[URL=http://tadej-ivan.50webs.com/style.css]style.css[/URL]” …

You see, few site’s updates back (when I use quite different design), the “padding” for my main div class did in fact work on both, the left and the right side (also in Firefox), but then I’ve changed something and now the text goes straight to the right window border.

I use this code related to margins/padding:

[CODE]body { margin-left : 4%; margin-right : 4%; }
div.master { padding : 0 1em; }[/CODE]

Well, actually for the “[I]margin-left : 4%[/I]” and “[I]margin-right : 4%[/I]” I see no changes if I experiment with different values; or maybe this in fact sets both margines as seen in IE (and not “[I]padding : 0 1em[/I]” for the main div class), while I was thinking about another option: “[I]body { margin-left: 20px; margin-top: 20px; margin-right: 20px; margin-bottom: 20px; }[/I]“, but this one also has no effect in both IE and Firefox; though I obviously need to experiment a bit more. So I am curious, how should I get my original layout back ?? I know that one way is probably to simply put the main “div” element in a table, and set the “padding” for the table element, however, is there any other way (an easier or more straight-forward one, preferrably with CSS) ??

P.S. — You see, it’s that I learn so many new things each day (mostly with viewing the source of others sites, reading articles and posting on various discussion-boards), so that each site-update schedule contain many minor and major revisions to the site’s code. And so I’ve tried really many ways of doing things so far; like for instance for the general layout I’ve used “divs”, have done it with “tables” with internal/inline CSS with margins etc. etc.

tayiper

to post a comment
CSS

0Be the first to comment 😎

×

Success!

Help @tayiper 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...