Jump to content

FF *FireFox* 2.0 does'nt like my XHTML 1.1 Valid Centering..!?


Recommended Posts

Ok, heres the centering code:

...code...
<p align="center"><div align="center"><span id="1" align="center">
..code..
</span></div></p>

And here is my CSS File:

p,body {
font-family: Arial, Helvetica, sans-serif;
font-size: medium;
font-weight: 900;
font-style: normal;
font-variant: normal;
text-transform: none;
color: #9FAFFD;
background-color: #000000;
vertical-align: middle;
line-height: normal;
text-align: center;
white-space: normal;
border: 1px ridge #000099;
}

 

It shows left aligned no matter what I do.

Hmm.. all I use in my website is a text-align:center; and it centers everything fine for me.

 

I think there is a problem with your HTML syntax.

 

Try replacing the

 

<p align="center"><div align="center"><span id="1" align="center">

 

With

 

<p style="align:center"><div align="center"><span id="1" style="align:center">

 

That should fix it I think.

try creating valid html!!!

 

divs DO NOT belong inside paragraphs - this way you will create more than enough html soup to mkae it nigh on impossible to maintain and extend your site.

 

if you want an element centered within another element then give it margin: 0 auto; - use text-align to change the way text is alinged within an element.

Hmm.. all I use in my website is a text-align:center; and it centers everything fine for me.

 

That isn't xhtml valid. You can't text-align: center images or divs. It work on like IE6 but not FF or Opera!

Don't do it again - for fear of retribution in life 2.0!!!!!!

 

keep it simple - nice clean semantic markup and mimmal amount of css to schieve your goals - will make life 1.0 MUCH easier.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.