/    Sign up×
Community /Pin to ProfileBookmark

Css dont work in explorer

Hey,

My css file works perfectly on firefox but doesnt on explorer. The firefox style is what i want yet the explorer style just wont work. The container isnt centered, the buttons arnt aligned right.

The site: [URL=”http://www.cpdistributing.net”]CP Distributing[/URL]

The file: [URL=”http://www.cpdistributing.net/style/style.css”]CSS File[/URL]

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@WebJoelOct 23.2007 — The lack of a valid !doctype ensures that IE is in 'quirks mode', and you cannot 'center' anything using a stated [I]width[/I] & [I]margin:auto;[/I]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

Your CSS:
.container {

background: url("../images/background.gif") repeat-y;

border: 1px solid #000000;

[B]margin-left: auto;

margin-right: auto;[/B]


padding: 0px;

width: 590px;

}[/QUOTE]
(could be shortened to merely [B]margin:0 auto;[/B]) won't work in IE without a valid !doctype.

[upl-file uuid=b074b7ec-75f3-48dd-a5b0-fedc86d1cc7a size=16kB]ScreenHunter_1.gif[/upl-file]
Copy linkTweet thisAlerts:
@BrettNooyenOct 23.2007 — I would also chime in that I would stop using the "<center>" tag, and either use auto margins as Joel suggested above or a "text-align: center".

?
×

Success!

Help @Kyrik 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.20,
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,
)...