Topic: Does anyone know how to center a table on screen with HTML 4.01 Strict and CSS? |
|
---|---|
Author | Thread |
Nervous Wreck (II) Inmate From: Sunnyvale, California (USA) |
posted 11-12-2001 12:29
I am trying to make the jump from HTML 4.01 Transitional to HTML 4.01 Strict and for the most part, it is a piece of cake, but one little thing evades me: centering a table on screen. It was so simple in HTML 4.01 Transitional and with previous versions of HTML... |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 11-12-2001 14:46
Brian Sexton: Welcome. Yes this is easy to do. The good people at BlueRobot have this question covered. You can use auto-width margins: http://bluerobot.com/web/css/center1.html |
Maniac (V) Mad Scientist From: |
posted 11-12-2001 21:44
Ran into a similiar conundrum recently. Since all I wanted to do was center content, squishing Body via CSS2 was all it took. |
Nervous Wreck (II) Inmate From: Sunnyvale, California (USA) |
posted 11-13-2001 04:57
So... it looks like replies on this board go with the thread rather than with a specific post? |
Maniac (V) Mad Scientist From: |
posted 11-13-2001 19:10
Brian, that's almost creepy. Same basic idea that I did for my wife. |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 11-13-2001 19:24
Brian: You'll have to set body { text-align: center; }for IE/Win. |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 11-14-2001 02:32
warjournal: By the way that is a neat solution for a fluid site (tucks that one away for future reference!!) but I don't think you need to have that style on the body you could just use it on a DIV that contains everything. |
Maniac (V) Mad Scientist From: |
posted 11-14-2001 05:54
Thanks, Emps. I'm almost innovative. And to think, this is the first time that I'm really putting CSS to use beyond a:hover. Bit of a paradigm shift for me. |
Nervous Wreck (II) Inmate From: Sunnyvale, California (USA) |
posted 11-17-2001 05:48
It looks like the automatic margins method does not work under Internet Explorer 5.5. Ugh. I still want to write to the standards rather than to any particular browser, but I really wish there was a more intuitive solution for this and earlier. |