table center

He has: 688 posts

Joined: Feb 2001

I'm working on a page where I'm trying to center the table. I tried using align="center" within the table tag. That didn't work so I tried surrounding the table with . That too didn't work so I just stuck around the whole thing and still nothing? What am I doing wrong here? Shouldn't ALL of these have worked? I've got another table on another page giving me the same trouble.

http://www.hampton-homes.net/homes/ Confused

Thanks in advance for the help. Smiling

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

The link doesn't work for me :S but try having go through the validator or HTML tidy at w3.org, they usually fix things for you Laughing out loud

Busy's picture

He has: 6,151 posts

Joined: May 2001

put align="center" in the table tag above 'A brief description ...'

taff's picture

They have: 956 posts

Joined: Jun 2001

You've got two tables in your content section. The table with your pictures *is* centered. However, it is centered within a left-aligned, default width table.

You can center the "content table" as Busy suggested or simply giving it a 100% width should do the trick.

.....

druagord's picture

He has: 335 posts

Joined: May 2003

by the way putting the align="center" in the table tag will center what is inside the table not hte table itself the other 2 solutions you wrote should work

IF , ELSE , WHILE isn't that what life is all about

Busy's picture

He has: 6,151 posts

Joined: May 2001

align in the table tag will align the table only
align in the td cell will align the contents only

He has: 688 posts

Joined: Feb 2001

and the winner is.... Taff. I had no idea that I had extra table tags floating around. I closed off my table in the header file for some unknown and dumb reason and never noticed it. Because the code validated I never looked for any errors like that. The table centering problem was caused because the table didn't properly terminate. Thanks for noticing that Laughing out loud

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.