Closed
Bug 439254
Opened 17 years ago
Closed 17 years ago
No margins within TABLE (?)
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: terje.rosenlund, Unassigned)
Details
Attachments
(1 file)
|
1.56 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; nb-NO; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; nb-NO; rv:1.9) Gecko/2008052906 Firefox/3.0
Documentation states that CSS:margin Applies to: all elements but setting margin for tr, td or th has no effect (same in IE7)
I hope the documentation is right
As seen on my test-app there is no way to adjust space between cell-borders in a table
Reproducible: Always
Steps to Reproduce:
1. Run test-app
A fix for this would simplify and reduce the amount of code needed to control table-layouts very much
(usually done by removing cell-borders and inserting a block-level element with margins and borders)
| Reporter | ||
Comment 1•17 years ago
|
||
(In reply to comment #0)
> Documentation states that CSS:margin Applies to: all elements but setting
> margin for tr, td or th has no effect (same in IE7)
>
> I hope the documentation is right
Which documentation are you talking about? The relevant documentation is the CSS specification ( http://www.w3.org/TR/CSS21/propidx.html ) which states that margin applies to:
"all elements except elements with table display types other than table-caption, table and inline-table"
> As seen on my test-app there is no way to adjust space between cell-borders in
> a table
See border-spacing.
| Reporter | ||
Comment 3•17 years ago
|
||
> Which documentation are you talking about?
I might be in the wrong place (or simply wrong) with this (Firefox/3.0 ?) but the documentation I'm talking about is: http://developer.mozilla.org/en/docs/CSS:margin
Also http://msdn.microsoft.com/en-us/library/ms530799(VS.85).aspx states that margin applies to eg. TD and TH (does'nt work)
Last, http://www.w3.org/TR/css3-box/#margins states the same but I now see that this is a working draft for CSS3
I assume this is no bug then but something for the wish-list?
Comment 4•17 years ago
|
||
(In reply to comment #3)
> I might be in the wrong place (or simply wrong) with this (Firefox/3.0 ?) but
> the documentation I'm talking about is:
> http://developer.mozilla.org/en/docs/CSS:margin
Someone should correct that document, CSS 2.1 (see below for the reference) is very clear
> Also http://msdn.microsoft.com/en-us/library/ms530799(VS.85).aspx states that
> margin applies to eg. TD and TH (does'nt work)
That document is wrong (even IE doesn't follow it). It also contradicts CSS 2.1.
>
> Last, http://www.w3.org/TR/css3-box/#margins states the same but I now see that
> this is a working draft for CSS3
[quote]
The properties apply to all boxes except certain table-* boxes (see [CSS3TBL]) and certain inline-level boxes (see [CSS3TEXT]).
[/quote]
note the 'except certain table-* boxes'
a td is an element with the display value of table-cell
The relevant page in CSS 2.1 states:
Applies to: all elements except elements with table display types other than table-caption, table and inline-table
http://www.w3.org/TR/CSS21/box.html#propdef-margin
> I assume this is no bug then but something for the wish-list?
>
As stated in comment 2, 'border-spacing' is the property you are looking for.
http://www.w3.org/TR/CSS21/tables.html#propdef-border-spacing
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 5•17 years ago
|
||
My employer requires me to write cross-browser compatible code and 'border-spacing' is not in IE
Border-spacing was defined in CSS1 as a property of a frameset-element but leaves it to the language to define which elements is framset-elements. Mozilla (and later opera) selected to implement it on tables while IE did not
Border-spacing differs from eg. margin, border and padding by having only 2 parameters (horizontal and vertical) but is actually the same as setting a margin for other block-elements
In CSS3 box-model all borders have this property which makes it the same as a margin (assuming there will be defined at short version as for margin, border and padding)
There is no ‘border-spacing‘ attribute and the ‘margin’ attribute refers to the CSS3TBL document. It has a section describing ‘border edge’ where the definition is identical to the ‘margin’ definition for other block-elements
It could be argued that it would better to implement margins for table-elements making the language more consistent and avoiding confusion by having multiple attributes describing the same physical thing
| Reporter | ||
Comment 6•17 years ago
|
||
I agree that this is an INVALID bug but not that its RESOLVED
Reopening bug in hope for a comment on my last comment :)
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 7•17 years ago
|
||
(In reply to comment #6)
> I agree that this is an INVALID bug but not that its RESOLVED
But as far as Bugzilla is concerned, it is resolved: INVALID. Gecko follows the relevant specs.
This is not the place for advocacy.
You should take up your issue with the W3C CSS Working Group, using the www-style mailing list.
IE8 supports border-spacing, btw.
(I know, that doesn't help you in the real world - I still have to deal with IE 5.5… Meanwhile, the equivalent html attribute: 'cellspacing' is perfectly valid and supported by all rendering engines).
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•