HighDots Forums  

display:block problem in Opera

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss display:block problem in Opera in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David Morris
 
Posts: n/a

Default display:block problem in Opera - 08-20-2004 , 03:39 AM






G'day.

Is there a known "display:block;" problem in opera?

In playing around trying to get some cross browser conformance, I either
inadvertently or redundantly (depending on your perspective) added
"display:block;" to a style defining tables that also had zero padding, margin
and border.

With "xdisplay:block;" (that is nothing) all browsers (well Ie6, MZ, Ff Op in
Win2k) showed the table as expected. When "display:block;" is set the tables in
Opera only, have a 1 or 2 px border added to the cells.

I cannot tell you how long it took me to notice this... in fact I gave up on
opera as being seriously broken, rather than some redundancy in my code.

In case I am not being very clear the examples below should show the problem:
(nb the problem ONLY occurs in Opera.)

http://www.netwiz.com.au/opera/operagood.html

and with display:block; munged out to xdisplay:block;

http://www.netwiz.com.au/opera/operagood.html

regards DM
----------------------------------------------------------------
David Morris
http://www.netwiz.com.au/
Perth Western Australia



Reply With Quote
  #2  
Old   
David Morris
 
Posts: n/a

Default Re: display:block problem in Opera - 08-20-2004 , 04:01 AM






oops, that should read:

http://www.netwiz.com.au/opera/operagood.html

and with display:block; munged out to xdisplay:block;

http://www.netwiz.com.au/opera/operabad.html




Reply With Quote
  #3  
Old   
Spartanicus
 
Posts: n/a

Default Re: display:block problem in Opera - 08-20-2004 , 04:17 AM



"David Morris"
<DONTSPAMdlmorris-ATDONTSPAMATnetwiz-com-au@don't.use.this.bit> wrote:

Quote:
With "xdisplay:block;" (that is nothing) all browsers (well Ie6, MZ, Ff Op in
Win2k) showed the table as expected. When "display:block;" is set the tables in
Opera only, have a 1 or 2 px border added to the cells.
If you want a table element to be rendered as a table then it should be
set to display:table, since this is the default it's superfluous.

Setting the table element (or tr/td) to display:block will change the
element to behave like for example a div.

Other UAs don't handle this correctly, Opera does.

--
Spartanicus


Reply With Quote
  #4  
Old   
David Morris
 
Posts: n/a

Default Re: display:block problem in Opera - 08-20-2004 , 04:23 AM




Quote:
If you want a table element to be rendered as a table then it should be
set to display:table, since this is the default it's superfluous.

Setting the table element (or tr/td) to display:block will change the
element to behave like for example a div.

Other UAs don't handle this correctly, Opera does.

In this case it was superfluous anyway (see http://www.netwiz.com.au/home.html)
, but why is adding a border, when the style sets the borders to 0px, the
correct way of doing it?





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

Default Re: display:block problem in Opera - 08-20-2004 , 04:45 AM



"David Morris"
<DONTSPAMdlmorris-ATDONTSPAMATnetwiz-com-au@don't.use.this.bit> wrote:

Quote:
If you want a table element to be rendered as a table then it should be
set to display:table, since this is the default it's superfluous.

Setting the table element (or tr/td) to display:block will change the
element to behave like for example a div.

Other UAs don't handle this correctly, Opera does.

In this case it was superfluous anyway (see http://www.netwiz.com.au/home.html)
, but why is adding a border, when the style sets the borders to 0px, the
correct way of doing it?
You're not making any sense, what do borders have to do with this? And
why did you set display:block on the table/tr/td elements in the first
place?

--
Spartanicus


Reply With Quote
  #6  
Old   
David Morris
 
Posts: n/a

Default Re: display:block problem in Opera - 08-20-2004 , 04:49 AM




Quote:
You're not making any sense, what do borders have to do with this? And
why did you set display:block on the table/tr/td elements in the first
place?

Well... ....because the display of borders IS the problem. Try viewing
http://www.netwiz.com.au/opera/operabad.html in any other browser.

Why I had it there is the first place was because I was trying all sorts of
things to get the borders to behave the same way mostly because of the
differing box model problem - these where problems between ie and mz, which I
eventually solved. I was also trying to limit my self to "css1", so I didn't
think of display:table;, but in any case we can both agree my use of it was
either wrong or redundant.

My point is that it should NOT affect the borders, regardless of whether my use
was right or wrong. At worst it should just be ignored.





Reply With Quote
  #7  
Old   
Spartanicus
 
Posts: n/a

Default Re: display:block problem in Opera - 08-20-2004 , 04:55 AM



"David Morris"
<DONTSPAMdlmorris-ATDONTSPAMATnetwiz-com-au@don't.use.this.bit> wrote:

Quote:
In this case it was superfluous anyway (see http://www.netwiz.com.au/home.html)
Btw, the stylesheet used there is packed with superfluous code.

I hope you didn't actually write that yourself, if you did then you
really need to learn css, start here: http://w3.org

If this was generated by a tool, ditch it.

--
Spartanicus


Reply With Quote
  #8  
Old   
David Morris
 
Posts: n/a

Default Re: display:block problem in Opera - 08-20-2004 , 05:00 AM




"Spartanicus" <me (AT) privacy (DOT) net> wrote

Quote:
"David Morris"
DONTSPAMdlmorris-ATDONTSPAMATnetwiz-...t.use.this.bit> wrote:

In this case it was superfluous anyway (see
http://www.netwiz.com.au/home.html)

Btw, the stylesheet used there is packed with superfluous code.

I hope you didn't actually write that yourself, if you did then you
really need to learn css, start here: http://w3.org
I probably have lots to learn,... however, the central panel was generated by a
tool, which also produces the external stylesheet used by the rest of the pages
on the site. I agree, that there are lots of redundant aspects to their
stylesheet, but I have to tell you that for single source production of html,
help, htmlhelp, word, javahelp and the rest, Authorit! is unbeatable. So it
is trade of between speed and useability for me. See
http://www.author-it.com/. I have made considerable modifications to their
output, so see also: http://www.netwiz.com.au/tools_for_authorit.html.




Reply With Quote
  #9  
Old   
David Morris
 
Posts: n/a

Default Re: display:block problem in Opera - 08-20-2004 , 05:08 AM



Quote:
I probably have lots to learn,... however, the central panel was generated by
a
tool, which also produces the external stylesheet used by the rest of the
pages
on the site. I agree, that there are lots of redundant aspects to their
stylesheet, but I have to tell you that for single source production of html,
help, htmlhelp, word, javahelp and the rest, Authorit! is unbeatable. So it
is trade of between speed and useability for me. See
http://www.author-it.com/. I have made considerable modifications to their
output, so see also: http://www.netwiz.com.au/tools_for_authorit.html.


Oh, and I should add, the buttons down the left panel are all mine, and all
pure CSS! http://www.netwiz.com.au/home.html




Reply With Quote
  #10  
Old   
David Morris
 
Posts: n/a

Default Re: display:block problem in Opera - 08-20-2004 , 05:51 AM



Quote:
Good luck with it, and stop complaining when a proper browser like Opera
actually executes the CSS as it should.

I think you have failed to understand the problem. AuthorIt has NOTHING to do
with this problem, and http://www.netwiz.com.au/opera/operagood.html which
shows it, is hand coded in Notepad.

Do you have something to do with Opera? ... you seem unnaturally defensive.




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.