473,386 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

center tables with CSS

Hi,

I have a problem with CSS. I read in other postings that it should be
possible to center tables by

TABLE {margin-left:auto; margin-right:auto}

in an external stylesheet.
But it doesn't work with IE 6.0 as it seems.
I have to center my tables with

<table align="center">.

Can anybody help me. Thanks.

Bye

Bastian
Jul 20 '05 #1
3 2847
Els
Bastian wrote:
I have a problem with CSS. I read in other postings that it should be
possible to center tables by

TABLE {margin-left:auto; margin-right:auto}

in an external stylesheet.
But it doesn't work with IE 6.0 as it seems.
I have to center my tables with

<table align="center">.


Doesn't sound correct.
Have you set a width on the table? Have you used a doctype?
It should work in IE6.

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -

Jul 20 '05 #2
da**********@onlinehome.de (Bastian) wrote:
I have a problem with CSS. I read in other postings that it should be
possible to center tables by

TABLE {margin-left:auto; margin-right:auto}

in an external stylesheet.
But it doesn't work with IE 6.0 as it seems.


Are you triggering quirks or standards mode? If standards mode then
this will work in IE6. If quirks mode then it won't.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3
Bastian wrote:
TABLE {margin-left:auto; margin-right:auto}
But it doesn't work with IE 6.0 as it seems.


<http://dorward.me.uk/www/centre/#ie>

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Campbell's List | last post by:
Hi, I'm completely new to MySql and need help importing tables from Access or Dbase. I am using Dreamweaver MX to create a data-driven web site. With the VPS hosting plan we're on, our remote...
6
by: Bastian | last post by:
Hi, I have a very crazy problem with CSS. I have tried to center my tables with TABLE {margin-left:auto; margin-right:auto} how it is described in many other postings. Mozilla and Konqueror...
2
by: googley | last post by:
I'm starting a new thread for a problem that I ran into.. I'm trying to use STYLE SHEETS/CSS to update multiple table widths across many pages. I did get it working with one small problem that...
9
by: klh | last post by:
We are running on Win 2003/DB2 V8 FP7a. My question concerns Task Center. I have about 200 tasks created and scheduled in Task Center. We are going to be moving many of the databases from this...
3
by: scoffer | last post by:
Hi all, I have a problem when I try to open the tables list on a database. I work with 8.2.0 Enterprise Edition. The control center return this error: SQL0104N E' stato trovato un token...
0
by: Sharath | last post by:
Quality Globe is Glad to Offer you the Fast Track course on Automation, QTP Basics and Advanced, and Quality Center Starting Date: June 4th, 2007 Timings: 10 AM to 3:30 PM Duration: 50 Hours ...
0
by: CptJack | last post by:
I've been banging my head on this one for a while now, so maybe someone else can figure out what's wrong here. I have several tables throughout my site which are defined using: <asp:Table...
14
by: gaijinco | last post by:
I was a hobbist web coder for years but I had to sidestep for a while. Now I'm trying to return to it and I'm trying to clarify how am I supposed to do somethings with CSS v.s. HTML and I'm...
13
by: Stevo | last post by:
I've found that for IE6+, if you add the property text-align:center to a DIV, then *anything* inside it gets centered. That can be a table, an object/embed, another DIV, an image, or some text. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.