loony383 Posted May 11, 2008 Share Posted May 11, 2008 I am creating a forum and im trying to align the table into the middle. in IE i somehow did this with text-align and it aligned my whole site (like i wanted) but i cannot seem to get it to align center in Firefox or Safari, heres my css code. i know it is messy but once the forum is finished ill clean up all code. <!--- body { a:link, a:visited, a:active { text-decoration: none} font-family:Verdana, Sans-serif; color; red; font-size: 12px } body { background-image: url(images/background.png); background-repeat: repeat-all; text-align:center; } input,textarea, select,{ color : #000000; font: normal 12px; border-collapse: collapse; border: 1px solid #000000; } /* background-image: url(./images/gradient-background.jpg); /* background-repeat: repeat-x; */ .maintable {border: 1px ; width: 800px; padding: 1px; background-color: navy; align: center ; margin: 2%;} /*main table for forum*/ .regrow {font-family: Verdana,Sans-serif; color: #000000; font-weight: bold; background-color: #FFFFFF;font-size: 14px; margin: 2%;} /*registration row, mainly here for symetry*/ .headline {font-family: Verdana,Sans-serif;font-weight: bold;color: black;background-color: gray; text-align: center ; background-image: (./images/gradient.jpg); background-repeat: repeat-x; font-size: 13px ; margin: 2%;} /*headline row, the first row that says forum name, topics, posts and such*/ .forumrow {font-family: Verdana,Sans-serif; color: #000000;background-color: #F2F2F2;font-size: 14px; margin: 2%;} /*color of the forum rows*/ .mainrow a:link, a:visited, a:active { text-decoration: none; margin: 2%;} .mainrow {font-family: Verdana,Sans-serif; color: #000000;background-color: silver;font-size: 14px; margin: 2%; a:link, a:visited, a:active { text-decoration: none}} /*color of the forum rows*/ .maintables{background-color: #FFFFFF; width: 95%; margin: 2%; padding: 0px; border: 1px solid; cellspacing: no} /*main table for forum*/ ---> EDIT: here is the site live http://www.airboard.impulse82.net Quote Link to comment https://forums.phpfreaks.com/topic/105146-solved-table-aligning-in-ie-and-not-in-firefox/ Share on other sites More sharing options...
peranha Posted May 11, 2008 Share Posted May 11, 2008 .maintable {border: 1px ; width: 800px; padding: 1px; background-color: navy; align: center ; margin: 2% auto 0 auto;} /*main table for forum*/ that should work, works for me. it aligns the left and right to auto which will center. Quote Link to comment https://forums.phpfreaks.com/topic/105146-solved-table-aligning-in-ie-and-not-in-firefox/#findComment-538325 Share on other sites More sharing options...
loony383 Posted May 11, 2008 Author Share Posted May 11, 2008 Thanks works perfectly Quote Link to comment https://forums.phpfreaks.com/topic/105146-solved-table-aligning-in-ie-and-not-in-firefox/#findComment-538327 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.