Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opera & display: none

Status
Not open for further replies.

y2k1981

Programmer
Aug 2, 2002
773
IE
after doing some testing, I'm 99% sure that I'm right but I just want to confirm, does opera not support display: none? Are there any other browsers that don't?

I have a menu at
As I'm sure you can guess, the menu's colapse/expand upon clicking. It's working fine in IE4 & 5 and in mozilla (I don't have NS to test it out, and my HDD is FULL so I can't install yet). So I added style: display none and visibility: hidden in the hope that it would work in opera. The first menu (because it's visible when the page loads) will toggle visible/hidden, but the menu's below it don't do anything and don't move up when you colpase the top menu. So what do I need to do to get around this?

Also, when you mouse over the menu headings, they act strange (at least on IE5, they don't seem to on IE4), does anybody know why this is?

thanks in advance for any help
 
The menus work in Opera 7.03, except alerts pop up on clicking.

visibility:hidden is like making it invisible, but it is still there layoutwise. display:none should make it like it doesn't exist, so the layout will collapse.

"News and views of some obscure guy"
 
yeah, sorry about the alerts, when it wasn't working in opera I was putting in alerts to see what "path" it was taking. what you're saying about the visibility vs display makes sense. but it's not working in opera 6. do you know if opera6 supports display: none?
 
I jusr looked at and display is part of css2, does opera 6 support css2? i'm guessing yes, and if that's the case, shouldn't it work?

Maybe I missed something so I'll have another go tonight
 
Well, if you have Opera 6, (I don't) try making a "hello world" page with one paragraph. Then you can test the display:none for Opera in a simple, controlled environment:

<html>
<p style=&quot;display:none;&quot;>Hello World</p>
</html>

&quot;News and views of some obscure guy&quot;
 
I've jut tried it in Opera 4, and the bits that are display:none don't display. Unfortunately they don't appear when you click on the headings either - it seems to ignore the OnClick event of the <td>. You might consider surrounding the [+] and [-] images with appropriate <a> tags if supporting such ancient browsers is an issue.

-- Chris Hunt
Extra Connections Ltd

The real world's OK for a visit, but you wouldn't want to LIVE there!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top