/    Sign up×
Community /Pin to ProfileBookmark

Chrome and Safari ignoring margins

For some odd reason, Chrome and Safari are ignoring the margin in this CSS code:

[code=html]#issue{
margin-left: 170px;
padding: 50px 20px;
text-align:center;
}
[/code]

Any ideas?

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@FangJan 29.2009 — You will have to give a lot more code; the html and css of he element and it's parent. Preferably a link.

In which browsers does it appear to work correctly?
Copy linkTweet thisAlerts:
@bejitto101authorJan 29.2009 — It works right in IE and FF.

The CSS for the parent element:

[code=html]#content {
background-color:#59554A;
overflow:hidden;
}[/code]


Link: http://www.entertainmentengineering.com/v6.issue01/

The div with the issue is #issue. The content should be centered, in the right column, and aslo, there are some issues with overflow:hidden. In chrome, it seems cutting off some content when the window size is changed. I assumed this is because it's not displaying the margin correctly yet still trying to hide the overflow while still taking into account the margin.

Edit: I seemed to fix the issue by removing:

[code=html]
height: 100%;
overflow: hidden;
[/code]


from the parent.
×

Success!

Help @bejitto101 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.16,
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,
)...