![]() | |
#1
| |||
| |||
|
|
The html below displays correctly in IE but not in Opera nor Firefox. The problem is with the style attribute for tbody tag. If I remove it, the display is fine. So my question is what's wrong with the style in tbody.. isn't that supported? |
|
td style="padding:3; " |
#2
| |||
| |||
|
|
It's not complicated. Just two simple tables one nested in the other. Maybe there are better ways using css only but my method is not *wrong*. |
#3
| |||
| |||
|
|
It's not complicated. |
|
Now it html and css validates with 0 errors and still the problems persists. |
#4
| |||
| |||
|
|
John Dalberg wrote It's not complicated. Just two simple tables one nested in the other. Maybe there are better ways using css only but my method is not *wrong*. bangs brucies head on desk / Yes, *it is wrong*. You are applying display: block to an element where that does not make sense. Table bodies can *not* be block level element. It does not pull an error because it *is* syntactally correct. However it is most certainly semantically incorrect. It's like saying body {display: inline;}. Syntax is correct but what do you think a browser would do with it? Just why do you want to turn a <tbody> element into a block level element in the first place? At the very least you should be using display: table-row-group (as per the CSS specification, chapter 17). Ideally you should omit the display property altogether and let the default style sheet (appendix A in the spec) override the default display: inline with display: table-row-group. |
#5
| |||
| |||
|
|
What's the proper way of hiding a few table rows in css as a default when a page loads without resorting to Javascript? |
|
Just why do you want to turn a <tbody> element into a block level element in the first place? |
#6
| |||
| |||
|
|
What's the proper way of hiding a few table rows in css as a default when a page loads without resorting to Javascript? John |
#7
| |||
| |||
|
|
What's the proper way of hiding a few table rows in css as a default when a page loads without resorting to Javascript? |
#8
| |||
| |||
|
|
On Tue, 2 Nov 2004 21:40:58 -0800, John Dalberg <john_dd (AT) hotmail (DOT) com wrote: [snip] What's the proper way of hiding a few table rows in css as a default when a page loads without resorting to Javascript? There is no "proper way" because you shouldn't do it. If you intend to use scripting to show and hide rows, only scripting should do that. What if the user agent hides the rows, but it cannot perform the script actions to show them again? How are your users supposed to effectively access the content? As I've said previously, hide the rows with script. If they can be hidden that way, you can be sure the user can show them again. Mike |
![]() |
| Thread Tools | |
| Display Modes | |
| |