This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > July 2004 > table padding bug? - Internet Explorer 6
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
table padding bug? - Internet Explorer 6
|
|
| Knoxy 2004-07-17, 11:15 pm |
| 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
| |
| Steve Pugh 2004-07-18, 12:15 pm |
| andrew.knox@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 <steve@pugh.net> <http://steve.pugh.net/>
| |
| Rob Collyer 2004-07-18, 12:15 pm |
| 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" <steve@pugh.net> wrote in message
news:8hskf0d8kubuki6fg5ki042u1787jq5iem@4ax.com...
> andrew.knox@arsenalnews.co.uk (Knoxy) wrote:
>
>
> 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.
>
>
> 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 <steve@pugh.net> <http://steve.pugh.net/>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|