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 10672
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;MARGIN-RIGHT:auto"
border="1">
cu
Bjoern Wolfgardt
Stan Brown <th************@fastmail.fm> wrote in message news:<MP************************@news.odyssey.net> ... In article <14*************************@posting.google.com> in comp.infosystems.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.PYKUYFuaPT@geoffball> in comp.infosystems.www.authoring.html, Geoff Ball <ge********@shaw.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;MARGIN-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.demon.co.uk> in
comp.infosystems. www.authoring.html, David Dorward
<do*****@yahoo.com> wrote: Stan Brown wrote:
In article <1234666.PYKUYFuaPT@geoffball> in comp.infosystems.www.authoring.html, Geoff Ball <ge********@shaw.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...
|
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...
|
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:...
|
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...
|
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...
|
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,...
|
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...
|
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.
...
|
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...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |