Shoutbox

Center tag in Firefox - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Center tag in Firefox (/showthread.php?tid=50480)

Center tag in Firefox by Weyzza on 09-14-2005 at 08:22 AM

Does anyone know the tag for Firefox to make an object centered?
The <center> tag works in IE not in Firefox.

I've searched for it, but I couldn't find any satisfying answer.
Thanks...

[ot]Whooo.... 1 post to go[/ot]


RE: Center tag in Firefox by RaceProUK on 09-14-2005 at 08:44 AM

Firefox adheres much more strictly to the W3C standards than IE does. However, if you set the DOCTYPE to HTML 3.2 or HTML 4.0/XHTML 1.0 Transitional, you should be able to use <center>. However, if you use HTML 4.0/XHTML 1.0 Strict, you have to use CSS e.g. style="text-align : center;".


RE: Center tag in Firefox by brian on 09-14-2005 at 10:45 AM

That would make it

code:
<div style="text-align: center">this text is centered</div>

RE: Center tag in Firefox by Fourjays on 09-14-2005 at 12:00 PM

<center></center> works fine for me in Firefox and IE and Opera (with XHTML Doctype). Only thing is that IE and Opera center everything between the tags, including any text within tables (unless specified otherwise in the CSS).


RE: Center tag in Firefox by RaceProUK on 09-14-2005 at 12:09 PM

quote:
Originally posted by brian
That would make it

code:
<div style="text-align: center">this text is centered</div>

You can also apply text-align to any element that can contain text, like <p>, <td>, <dd>, <div>, <span>... the list goes on.
RE: Center tag in Firefox by hmaster on 09-14-2005 at 05:03 PM

code:
<div align="center">centered text</div>
works mostly too :undecided:

RE: Center tag in Firefox by RaceProUK on 09-14-2005 at 06:47 PM

Yes, it will work, but it's deprecated, like the <center> tag. Using CSS is now the recommended (and standard) way.