/    Sign up×
Community /Pin to ProfileBookmark

The Center tag in IE versus Firefox

Hey I have what I hope will be a fairly simple question.

Does anyone know why the <center> tag seems to work for my table in Firefox but not IE?

It’s centered perfectly in Firefox but is justified to the left about 6-8 pixels in IE. This is just enough to be annoying because of how my graphics are layed out on the page. The table that I’m trying to center has no borders and cellpadding and cellspacing are set to 0.

It seems to be browser issue at this point, but I was wondering if there is some additional tag IE might recognize to keep my table centered exactly in the middle of the page.

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@mshalabiJan 05.2007 — post your code first.. ?
Copy linkTweet thisAlerts:
@JPnycJan 05.2007 — More than likely it's a margin issue. Try setting margin:0px for the table element, see if that makes a difference. IF there's any parent element, then set padding:0px for that.
Copy linkTweet thisAlerts:
@drhowarddrfineJan 05.2007 — OT - you need to get away from the <center> tag as it is deprecated.
Copy linkTweet thisAlerts:
@felgallJan 05.2007 — To centre text

[b]style="text-align:center"[/b]

to centre other objects

[b]style="width:[/b]100px[b];margin: 0 auto'"[/b]

The <center> tag is long gone and the align attrubute is now deprecated as well since positioning should be done using CSS and not HTML since position isn't content.
Copy linkTweet thisAlerts:
@WorldPlanterauthorJan 05.2007 — To centre text

[b]style="text-align:center"[/b]

to centre other objects

[b]style="width:[/b]100px[b];margin: 0 auto'"[/b]

The <center> tag is long gone and the align attrubute is now deprecated as well since positioning should be done using CSS and not HTML since position isn't content.[/QUOTE]


Sorry, I'm unfamiliar with CSS. I'm a 3d artist and animator by trade and just trying to throw a simple site together for my online portfolio. If i use the:

style="text-align:center" statement is there another line I need to add at the end of my text to complete it?
Copy linkTweet thisAlerts:
@felgallJan 05.2007 — You need some sort of tags around the text usually <p></p> or <div></div> so you just add the style="text-align:center" to whatever opening tag you are using in oder to centre the content of that tag pair.
×

Success!

Help @WorldPlanter 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.18,
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,
)...