Jump to content

align attr. and center tag


shannonlasell

Recommended Posts

I have noticed that align="center" and <center> are deprecated. I have found that using CSS that I may align-text: center; however, this does not work with tables.I could use CSS to give a ( left: #%; ). I was wondering what options (Total) that are available in doing this. :)

Link to comment
Share on other sites

I think you're wrong about the center not being working with tables. I recently used it and it worked. But you have to place the <table> tag as a selector, not a part of the the table itself. If you select a table cell, the center attribute will only align the data in the cell but not the cell itself(I think).I didn't quite catch, what you meant by "what options (Total) that are available in doing this.".Anyway... I'm a newbie with CSS, so whatever you meant, I'll most probably not know it :) .

Link to comment
Share on other sites

So, in conclusion, Microsoft sucks!Seriously though, I think I figured it out. If I text-align:center; every container that holds what i am centering, and I set a margin:auto; for everything inside the container then it looks normal.for example:stylesheet:-----------body { text-align:center; // for IE}table { margin:auto; // for Browsers that make more sense than IE}----------------------------page.html:-----------<html> <head> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <table> <tr> <td>Internet Explorer Sucks!</td> </tr> </table> </body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...