d22552000 Posted September 14, 2007 Share Posted September 14, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/69403-ff-firefox-20-doesnt-like-my-xhtml-11-valid-centering/ Share on other sites More sharing options...
Azu Posted September 15, 2007 Share Posted September 15, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/69403-ff-firefox-20-doesnt-like-my-xhtml-11-valid-centering/#findComment-348846 Share on other sites More sharing options...
ToonMariner Posted September 15, 2007 Share Posted September 15, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/69403-ff-firefox-20-doesnt-like-my-xhtml-11-valid-centering/#findComment-349199 Share on other sites More sharing options...
TheFilmGod Posted September 17, 2007 Share Posted September 17, 2007 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! Quote Link to comment https://forums.phpfreaks.com/topic/69403-ff-firefox-20-doesnt-like-my-xhtml-11-valid-centering/#findComment-349854 Share on other sites More sharing options...
d22552000 Posted September 17, 2007 Author Share Posted September 17, 2007 I only put the div to try and center it after hte css centering didnt work. Quote Link to comment https://forums.phpfreaks.com/topic/69403-ff-firefox-20-doesnt-like-my-xhtml-11-valid-centering/#findComment-349892 Share on other sites More sharing options...
ToonMariner Posted September 17, 2007 Share Posted September 17, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/69403-ff-firefox-20-doesnt-like-my-xhtml-11-valid-centering/#findComment-350152 Share on other sites More sharing options...
d22552000 Posted September 18, 2007 Author Share Posted September 18, 2007 eveyrthing css FTW! Quote Link to comment https://forums.phpfreaks.com/topic/69403-ff-firefox-20-doesnt-like-my-xhtml-11-valid-centering/#findComment-350449 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.