473,795 Members | 3,151 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2859
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**********@on linehome.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
2456
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 FreeBSD server only supports the PHP application server. PHP requires MySql. Thus, I installed a copy of MySQL Control Center 0.9.2 beta. (I prefer a GUI and not command prompts unless necessary.) The information I plan on using in developing...
6
2655
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 are accepting this way of centering the table but not IE. I also tried TABLE {margin-left: 0 auto}
2
3743
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 I can't figure out. For the sake of being really simple here are the steps i took. 1. create blank web page, create blank css page. 2. save 'em both, link them together.
9
3678
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 server to another V8 server and I really, really, really don't want to have to re-key all of these tasks on the new system. The Task Center "export" function seems to only export general task information like the description and type of task,...
3
2126
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 "SELECT TabSchema, Tabname, Type, T" non previsto dopo "BEGIN-OF-STATEMENT". I token previsti possono comprendere: "<query_expr_top>". SQLSTATE=42601
0
9318
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 Location: BTM Layout 1st Stage, Bangalore
0
1139
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 ID="tbl1" runat="server" HorizontalAlign="center" CellPadding="0" CellSpacing="0"> ...plus the rest of the table. The tables center properly in the browser, but when I try to validate the site with the W3C validator at validator.w3.org I get: This...
14
2435
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 specially having difficulties with center alignment of elements like images and tables. How is the "right" way to do it? (books that I have checked seemed to dodge the issue) I also have a doubt. html-atributes width and height are preferred over...
13
3324
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. Firefox and Safari on the other hand don't treat text-align in that way. In my tests on those browsers, they only centers images and text. Any DIVs, object/embeds or tables remain default unaligned and generally appear on the left. Considering...
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10438
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7540
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.