473,224 Members | 1,481 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,224 software developers and data experts.

table padding bug? - Internet Explorer 6

Hello, I've noticed one or two people post on this before but nobody
seems to have replied so raising the issue again... is this a known
IE6 CSS bug?

I have placed the following in my stylesheet file:
..formContentTable
{
padding: 10px 10px 10px 10px;
border: solid 1px #D1CFCF;
background: #F2F2F2;
}
and applied it to a <table> tag. Works fine in Firefox, Netscape,
Opera... but not IE6 - no padding at all. I just want the my form in a
'box' with padding just around the edges of the content.

To get around the problem, I has to bin the padding line and add the
following to my html page:

to my top table cells...
style="padding-left:10px;padding-top:10px;"

to my bottom table cells...
style="padding-left:10px;padding-bottom:10px;"
and that worked ok - not ideal though.

If anyone else has run into the problem or if it's something
ridiculous I've done in my code, let me know? Any help much
appreciated,
Andrew
Jul 20 '05 #1
2 19147
an*********@arsenalnews.co.uk (Knoxy) wrote:
.formContentTable
{
padding: 10px 10px 10px 10px;
}
and applied it to a <table> tag. Works fine in Firefox, Netscape,
Opera... but not IE6 - no padding at all. I just want the my form in a
'box' with padding just around the edges of the content.
Where do you think the padding should go in a table element? Between
the border and the outermost set of cells? Inside all the cells?
Inside some of the cells?

Whilst CSS 2.1 does explcitly allow padding to be set on tables
"Applies to: all elements except elements with table display types
other than table, inline-table, and table-cell"
<url: http://www.w3.org/TR/CSS21/box.html#propdef-padding>
it is totally vague about how the padding is actually applied. In some
places it states that the table is a normal block element:
"In terms of the visual formatting model, a table may behave like a
block-level or inline-level element. Tables have content, padding,
borders, and margins." but in other places it seems to totally ignore
the possiblity of padding on the table itself.
To get around the problem, I has to bin the padding line and add the
following to my html page:

to my top table cells...
style="padding-left:10px;padding-top:10px;"

to my bottom table cells...
style="padding-left:10px;padding-bottom:10px;"

and that worked ok - not ideal though.


Using a class rather than inline styles would be an improvement. If
you want to add padding to certain cells then this is the correct way
to do so.

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 #2
My experience with padding, and CSS, is that some browsers seem to redefine
the rules as to where the padding goes.... inside the table, around the
table.... whatever.

It's a web design nightmare sometimes!
--
Rob Collyer - www.webforumz.com
Web design and development forums for Free help, advice,
tips, and website critique by professional designers and developers.

"Steve Pugh" <st***@pugh.net> wrote in message
news:8h********************************@4ax.com...
an*********@arsenalnews.co.uk (Knoxy) wrote:
.formContentTable
{
padding: 10px 10px 10px 10px;
}
and applied it to a <table> tag. Works fine in Firefox, Netscape,
Opera... but not IE6 - no padding at all. I just want the my form in a
'box' with padding just around the edges of the content.


Where do you think the padding should go in a table element? Between
the border and the outermost set of cells? Inside all the cells?
Inside some of the cells?

Whilst CSS 2.1 does explcitly allow padding to be set on tables
"Applies to: all elements except elements with table display types
other than table, inline-table, and table-cell"
<url: http://www.w3.org/TR/CSS21/box.html#propdef-padding>
it is totally vague about how the padding is actually applied. In some
places it states that the table is a normal block element:
"In terms of the visual formatting model, a table may behave like a
block-level or inline-level element. Tables have content, padding,
borders, and margins." but in other places it seems to totally ignore
the possiblity of padding on the table itself.
To get around the problem, I has to bin the padding line and add the
following to my html page:

to my top table cells...
style="padding-left:10px;padding-top:10px;"

to my bottom table cells...
style="padding-left:10px;padding-bottom:10px;"

and that worked ok - not ideal though.


Using a class rather than inline styles would be an improvement. If
you want to add padding to certain cells then this is the correct way
to do so.

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

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

Similar topics

3
by: Joseph Haig | last post by:
I have a style sheet containing the following definitions: #leftcontent { position: absolute; left:20px; top:60px; width:180px; border:1px solid #000; padding-top: 15px; }
19
by: A.Translator | last post by:
I have an unordered list as menu and want some space at the bottom, underneath the last <li>. I have tried: setting bottom-margin to ul setting bottom-margin to containing <div> setting padding...
0
by: Red | last post by:
See http://reenie.org/test9.php There are two examples each with three nested divs. The only difference between the two is that the first example has no padding in the inner div, the second...
9
by: Cezar | last post by:
Hi! I'm styling my table with following CSS code: table.results{ border-collapse:collapse; } table.results td{ border:1px solid #a7a7a7; margin:0;
2
by: Martin Doyle | last post by:
Ok, I'm building a JS-based limitless-sublevel dynamic menu and am making it cross browser as well - 3 packs of aspirin so far and counting ;) I'm having a weird rendering problem using Opera...
3
by: daveland | last post by:
I am working on some JavaScript that dynamically adds rows to a table in response to a button click. A new row does appear on the screen when the button is clicked. However, that table to which a...
3
by: Becky Carter Hickman-Jones | last post by:
Hi, I have a simple script that opens an image in a new window which is sized to the image. The script is as follows: <a title="xxx"...
2
by: gubbachchi | last post by:
Hi all, I have a problem with css table. The code below works fine with firefox but the problem is with Internet explorer. This code actually fetches data from mysql database and display it in...
5
by: Stepheno | last post by:
Hi, I am a recently converted Iseries (AS/400) RPG programmer trying to learn HTML/CSS/JavsScript all at the same time (not fun). My problem deals mostly with CSS. I will be reveiving a table,...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.