473,805 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

To center a table crossbrowser

Hi at all
I'ld like to center a table crossbrowser therefore I wrote:
<sryle>
table {width:80%;marg in-left:auto;margi n-right:auto;}
</style>
firefox work fine but MSIE set the margin to zero
Thank in advance
May 31 '07
13 2784
In article
<11************ **********@m36g 2000hse.googleg roups.com>,
VK <sc**********@y ahoo.comwrote:
As you contributed a lot in similar discussions, you current surprise
seems to me a bit artificial.
What sort of sentence is this? Don't you care at all how you
write?

--
dorayme
Jun 2 '07 #11
VK
VK <schools_r...@y ahoo.comwrote:
As you contributed a lot in similar discussions, you current surprise
seems to me a bit artificial.

What sort of sentence is this? Don't you care at all how you
write?
Sapienti sat, but OK:

"Given your own position on relevant issues demonstrated in many
previous discussions: given that you current surprise seems to me a
bit artificial."

Other words: if one was getting furious on each deprecated or
semantically incorrect HTML/CSS usage, then why is this person being
surprised to see OP not daring to use a deprecated attribute, whatever
benefits would be?
Jun 2 '07 #12
In article
<11************ **********@o5g2 000hsb.googlegr oups.com>,
VK <sc**********@y ahoo.comwrote:
VK <schools_r...@y ahoo.comwrote:
As you contributed a lot in similar discussions, you current surprise
seems to me a bit artificial.
What sort of sentence is this? Don't you care at all how you
write?

Sapienti sat, but OK:

"Given your own position on relevant issues demonstrated in many
previous discussions: given that you current surprise seems to me a
bit artificial."

Other words: if one was getting furious on each deprecated or
semantically incorrect HTML/CSS usage, then why is this person being
surprised to see OP not daring to use a deprecated attribute, whatever
benefits would be?
OK, sorry, I was in a grumpy mood earlier.

I think the answer to your puzzlement lies in understanding that
some things are even more infuriating than others. It is
infuriating to see someone blindly trying to follow some rules at
the cost of great impracticality given their skills. On the other
hand, it is also infuriating to see someone making little effort
to follow good practice. The way these things play out in
practice and the reactions to them is not a neat simple business
with simple rules. We are in an inferno here and JK is just
negotiating the fires.

--
dorayme
Jun 2 '07 #13
VK wrote:
On Jun 2, 12:37 pm, "Jukka K. Korpela" <jkorp...@cs.tu t.fiwrote:
>Thus, I repeat my question: Why do people take great pains in avoiding such
simple presentational markup, on pages that otherwise suffer from divitis,
pixelitis, hidelinkitis, and all other sorts of horrendeous diseases?

I dare to say for the same reason why instead of for instance:

<table width="100%">
<tr>
<td width="10%">Lef t content</td>
<td width="80%">Cen ter content</td>
<td width="10%">Rig ht content</td>
<tr>
</table>

they are spending hours and days for some twisted div agglomerations
followed by huge stylesheets where 90% are different UA-specific
tricks and workarounds. Truly the amount of online resources about div-
based table layouts now allows to publish a 1000-page scientific
volume :-) Yet every single "universal solution" I tested so far
reminds me a domino tower: it falls apart on the slightest push - that
besides the fact that the layout functionality is still below the one
provided by a few lines above.
If you think it takes hours and huge stylesheets and twisted div then
you are probably being a code monkey and over-complicating your markup.
Yes, it is pretty simple to layout 3 vertical columns that way with a
table. But that initial perceived simplicity can really bite you in the
backside if you decide to change your layout from three columns side by
side to one along the top followed by two side by side, or all vertical
top middle and bottom, AND the site is 100+ pages. Your "simple' table
layout would require a complete rewrite of all said pages whereas if
done properly via CSS that change can be make by editing one stylesheet.
In addition restricting your markup to structure and content and using
CSS for the presentation your can offer alternated styles for the same
pages. An example would be a simplified styling with large high-contrast
text and linear layout for the visually impaired...maki ng your site
more accommodating.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jun 2 '07 #14

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

Similar topics

0
1544
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;}
3
2139
by: Steel | last post by:
Hi at all, I'ld want to know if position:absolute is crossbrowser. Infact I cannot position absolutely an element in the some place with fox-pro and MSIE6 There is always a little difference Steel
0
1618
by: Pablito | last post by:
Hi at all, I have a little problem about position:absolute. I want to position absolutely a menu bar. if I write: menubar {position: absolute;top:5.2em;} with MSIE the menu bar is too height on the screen and is right on FireFox elseif I write menubar {position: absolute;top:100px;} the menu bar is right with NSIE and not with FF How can I do to have a crossbrowser result of my menu var?
53
4145
by: brave1979 | last post by:
Please check out my javascript library that allows you to create any layout for your web page, nested as deep as you like, adjusting to width and height of a browser window. You just describe it in javascript object and that's all. No need to know CSS hacks, no need to clutter your html with tables. http://www.bravelayout.scarabeo.biz/Quickstart
2
16370
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 arrow when user click on the header to sort. The code is as below: <TABLE width="100%">
14
2438
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
3331
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...
1
1764
by: par7133 | last post by:
Hi, Yea, XMLHttpRequest give out a crossbrowser problem managing the status change of the connection. Here the solution: var xmlhttp; xmlhttp=null;
8
7895
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 need to use a CSS style to do the same thing. But I've dug through all of the categories in the...
0
10614
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...
1
10369
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
10109
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
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
7649
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
6876
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
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3847
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.