Hi,
I have read the you should no longer use 'align="center" ' when you
want to center a table or something other.
So I asked myself what should I use than. I found something that you
should use styles. But they used a attribute that is only for text
elements.
So can someone give me an example or an url where I can find further
information.
I first discovered this problem while testing my application with
Mozilla 1.3.1. The align=center for my tables had no effect. When I
put the table in a <div align=center> than all works fine.
cu
Bjoern 9 10686
Stan Brown <th************ @fastmail.fm> wrote: http://stone.thecoreworlds.net/www/centre/
That's a lovely resource, but it doesn't actually answer the question. :-(
It does, but this is a question that cannot be answered in
straightforward way as it depends on a number of variables (doctype,
<IE6 etc.>.
The page answers the question by explaining how it works in the "Teach a
man to fish" tradition.
Headless
LOL...
Web development is so confusing.
The CSS Way works fine with Mozilla. But not with IE 6. And Mozilla
doesn't use the align=center attribute but IE 6 does.
I think I will use both like this:
<table align=center style="MARGIN-LEFT:auto;MARGI N-RIGHT:auto"
border="1">
cu
Bjoern Wolfgardt
Stan Brown <th************ @fastmail.fm> wrote in message news:<MP******* *************** **@news.odyssey .net>... In article <14************ *************@p osting.google.c om> in comp.infosystem s.www.authoring.html, Bjoern Wolfgardt <aa*****@gmx.de > wrote:can someone give me an example or an url where I can find further information.
http://theodorakis.net/tablecentertest.html
It's the goods!
Stan Brown wrote: In article <1234666.PYKUYF uaPT@geoffball> in comp.infosystem s.www.authoring.html, Geoff Ball <ge********@sha w.ca> wrote:http://stone.thecoreworlds.net/www/centre/
That's a lovely resource, but it doesn't actually answer the question. :-(
Really?
Quote:
Block level content includes such elements as <h1>, <h2>, <p>, <table> (but
^^^^^
see IE Bugs), and <div>. To centre block level elements...
--
David Dorward http://david.us-lot.org/
Bjoern Wolfgardt wrote:
Please direct your attention to: http://www.allmyfaqs.com/faq.pl?How_to_post The CSS Way works fine with Mozilla. But not with IE 6. And Mozilla doesn't use the align=center attribute but IE 6 does.
I think I will use both like this: <table align=center style="MARGIN-LEFT:auto;MARGI N-RIGHT:auto" border="1">
MSIE is broken. You have to force it in to standards mode or take further
steps to centre block level content in it. See: http://david.us-lot.org/www/centre/#ie
--
David Dorward http://david.us-lot.org/
In article <bf************ *******@news.de mon.co.uk> in
comp.infosystem s. www.authoring.html, David Dorward
<do*****@yahoo. com> wrote: Stan Brown wrote:
In article <1234666.PYKUYF uaPT@geoffball> in comp.infosystem s.www.authoring.html, Geoff Ball <ge********@sha w.ca> wrote:http://stone.thecoreworlds.net/www/centre/
That's a lovely resource, but it doesn't actually answer the question. :-(
Really?
Quote: Block level content includes such elements as <h1>, <h2>, <p>, <table> (but ^^^^^ see IE Bugs), and <div>. To centre block level elements...
My apologies. I overlooked that.
I think Nick Theodorakis' page is much better for the OP's question
because it goes much more thoroughly into the specific issues of
tables, but I agree that the stone page does mention tables.
I think there is one problem with the suggested solution, which was
<div style="text-align: center;">
<div style="text-align: left; margin: 1em auto; width: 50%;">
</div>
</div>
When centering a table, if you do
<div style="text-align: center;">
<table style="text-align: left; margin: 1em auto; width: 50%;">
</table>
</div>
then doesn't that cause the <th> elements also to be left aligned,
by inheritance?
--
Stan Brown, Oak Road Systems, Cortland County, New York, USA http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
validator: http://jigsaw.w3.org/css-validator/
Stan Brown wrote: I think Nick Theodorakis' page is much better for the OP's question because it goes much more thoroughly into the specific issues of tables, but I agree that the stone page does mention tables.
Other then the <th> issue you mention below, there aren't any table specific
issues (at least with CSS centring methods). They are just block level
elements.
When centering a table, if you do
<div style="text-align: center;"> <table style="text-align: left; margin: 1em auto; width: 50%;"> </table> </div>
then doesn't that cause the <th> elements also to be left aligned, by inheritance?
Nothing preventing you from having:
..tableWrapper { text-align: center; }
table { text-align: left; margin: auto 1em; }
th { text-align: center; }
--
David Dorward http://david.us-lot.org/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: adam |
last post by:
The folowing code produces an error althought i cant understand why it
does this can any one help? THANKS
ERROR = Notice: Undefined variable: tab in
C:\Inetpub\wwwroot\carpound\table\table1.php on line 32
<?php
$link = mysql_connect("localhost","root","admin") or
die(mysql_error());
mysql_select_db("car") or die (mysql_error());
|
by: Jim |
last post by:
Im getting way too many rows retured..what its trying to do is insert
a 0 for revenue for months 7 - 12 (aka July through December) for each
of these cost centers for each payor type..Im getting a lot of repeats
and the concatenation field date always comes back as January 2003
instead of the month and date its supposed to
--Fiscal...
|
by: PayPal |
last post by:
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft DHTML Editing Control">
<TITLE></TITLE>
</HEAD>
<BODY>
<STYLE type=text/css>
..dummy {}
BODY, TD {font-family: verdana,arial,helvetica,sans-serif;font-size:
12px;color: #000000;}
|
by: francisco lopez |
last post by:
I hope not sent I twice.
ok here is my problem,
the javascript form validation works perfect during I put a
emaildirection in the <form action:""> comand, like this:
<form action="mailto:butacasalada@gmx.net" method="post"
name="formulario"
id="formulario" onSubmit="return chkFormular()">
|
by: ALI-R |
last post by:
Hi All,
I have two user controls (header and footer) ,,which I've placed in an HTML
Table in a page.I set the **align="center"** in the table and the table
still is on the left side of the page .How can I get the whole page(Table
and its user controls) aligned in the center of my page?
Thanks for your time in advance.
Ali
| |
by: yangtono |
last post by:
Hi,
I am creating a table to list some data. The table is using a sorting and highlight function that I found from the net.
I can't attach image here, basically html will wrap the heading, therefore I notice the second line of the header is left align instead of centering. I believe it's because of the sort.htc script that will output an...
|
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...
|
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,...
|
by: Bob Altman |
last post by:
Hi all,
This has got to be a dumb question, but... What is the CSS property that I
would use to center a table on the web page?
If I set the table's Align property in the VS 2008 property window it
inserts align="center" into the <tabletag, and I get a validation warning
that attribute 'align' is considered outdated. Ok, so I probably...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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. ...
| |
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...
|
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...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |