HighDots Forums  

Re: Works in IE but not in Opera or Firefox

alt.html alt.html


Discuss Re: Works in IE but not in Opera or Firefox in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark Parnell
 
Posts: n/a

Default Re: Works in IE but not in Opera or Firefox - 11-02-2004 , 06:34 PM






On Tue, 2 Nov 2004 15:24:21 -0800, John Dalberg <john_dd (AT) hotmail (DOT) com>
declared in alt.html:

Quote:
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?
Yes, when you use it correctly.

That code is far more complicated than necessary, even if (ab)using
tables for layout. You should also take a trip to the validator.

Quote:
td style="padding:3; "
Better break out those hobnobs again, Toby. (Hint: the unit is required
when specifying a non-zero value for padding.)

--
Mark Parnell
http://www.clarkecomputers.com.au
"Never drink rum&coke whilst reading usenet" - rf 2004


Reply With Quote
  #2  
Old   
rf
 
Posts: n/a

Default Re: Works in IE but not in Opera or Firefox - 11-02-2004 , 09:52 PM






John Dalberg wrote

Quote:
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.

<snip code which I will *not* copy/paste as there is no need to, the error
sticks out like dogs balls>

--
Cheers
Richard.




Reply With Quote
  #3  
Old   
Mark Parnell
 
Posts: n/a

Default Re: Works in IE but not in Opera or Firefox - 11-02-2004 , 10:06 PM



On Tue, 2 Nov 2004 18:32:06 -0800, John Dalberg <john_dd (AT) hotmail (DOT) com>
declared in alt.html:

Quote:
It's not complicated.
Certainly looks it from here.

Quote:
Now it html and css validates with 0 errors and still the problems
persists.
You still haven't told us what you believe the actual problem to be -
only that IE displays it differently (whatever that means) to other
browsers.

Others have already told you that the problem is probably due to the
display:block. If, after removing that, the problem still occurs,
explain exactly what isn't working the way you expect, and post a URL
displaying the behaviour in question.

--
Mark Parnell
http://www.clarkecomputers.com.au
"Never drink rum&coke whilst reading usenet" - rf 2004


Reply With Quote
  #4  
Old   
John Dalberg
 
Posts: n/a

Default Re: Works in IE but not in Opera or Firefox - 11-03-2004 , 12:40 AM



On Wed, 03 Nov 2004 02:52:48 GMT, rf wrote:

Quote:
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.
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


Reply With Quote
  #5  
Old   
rf
 
Posts: n/a

Default Re: Works in IE but not in Opera or Firefox - 11-03-2004 , 12:52 AM



John Dalberg

Quote:
What's the proper way of hiding a few table rows in css as a default when
a
page loads without resorting to Javascript?
Oh my &deity are you being intentionally thick? Or perhaps you are either
not recieving my posts or just not reading them.

As I said yesterday:

<tbody style="display: none">

A better way (since you aren't using javascript and so can never make them
visible again) is to simply not put them there in the first place. I am sure
somebody in this thread or in your other one has suggested this.

And will you read my last post again and answer this bit:

Quote:
Just why do you want to turn a <tbody> element into a block level element
in
the first place?
If you do not interact with a post but merely plonk yet more questions at
the bottom, you are going to be very quickly ignored.

--
Cheers
Richard.




Reply With Quote
  #6  
Old   
Neredbojias
 
Posts: n/a

Default Re: Works in IE but not in Opera or Firefox - 11-03-2004 , 03:53 AM



Without quill or qualm, John Dalberg quothed:

Quote:
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

I don't think I get what you're trying to do. Just make a few rows
"invisible", as in not display?

--
Neredbojias
Contrary to popular belief, it is believable.


Reply With Quote
  #7  
Old   
Michael Winter
 
Posts: n/a

Default Re: Works in IE but not in Opera or Firefox - 11-03-2004 , 07:37 AM



On Tue, 2 Nov 2004 21:40:58 -0800, John Dalberg <john_dd (AT) hotmail (DOT) com>
wrote:

[snip]

Quote:
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

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.


Reply With Quote
  #8  
Old   
John Dalberg
 
Posts: n/a

Default Re: Works in IE but not in Opera or Firefox - 11-03-2004 , 12:18 PM



On Wed, 03 Nov 2004 12:37:13 GMT, Michael Winter wrote:

Quote:
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
I have a unique situation where the html is scraped by automated processes.
I don't need to show these rows to a human being but they need to be hidden
for a human being. Therefore Javascript is not needed. However on the
server side, based on some conditions, some rows are hidden and some rows
are shown. For the scraping process, it doesn't matter what is hidden or
not because it doesn't care.

So to show some rows I use <tbody style="display: table-row-group;">
and to hide some rows it's <tbody style="display: none;">. Is this correct?
I was using <tbody style="display: block;"> which I assumed was going to
work because it worked properly in IE.

If I need to hide/unhide for human beings, I use Javascript and change the
display attribute for tbody after giving it an id?


John Dalberg


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.