PDA

View Full Version : Hide_Show Elements not fully working


Chapo
07-22-2008, 03:36 PM
I Have the Show-Hide behavior on a DIV that has another DIV inserted inside.
But when the behavior is aplied only the main DIV hides but the DIV inside still apears. I thought if i had the behavior Show-Hide Elements, it will aplied to the main DIV and all the DIV's inserted in it. I have to go to the behavior and also add the others DIV's to make them hide,so its more work to do instead of just doing the main DIV and that should be fixed. Why this happens ? is their a way that the behavior could work on the main DIV and all DIV's inside of it at once ?

domedia
07-22-2008, 03:52 PM
Weird, not supposed to do this. Do you have this online anywhere so we can see it as well?
Maybe the inside div is absoutely positioned, in which case it is taken out of the regular flow of the webpage.

Chapo
07-22-2008, 04:24 PM
I'm sorry, here it is.. www.fotorazi.com

Ok, here how it works so you can understand. When you open the page, it opens at Puerto Rico and you can see it at Mid-Page in red. Below there is menu in red tabs that changes to black on a mouse-over. The first 2 tabs has the behavior of Show-Hide Elements, (their the only ones by the way.)

You will notice when you move from "Locales" to "Ley & Orden" the behaviors works fine, a new DIV shows below revealing new info and stuff, and if you move back to "Locales" it goes back ti the original DIV, thats fine.

But when if you leave the tab on "Ley & Orden" (with Usher in the first pic) and click to another button like USA, MUNDIALES or any other in that Menu, the DIV will not Hide, it remains all along until i mouse-over the "Locales" tab.

The idea is that each TAB BUTTON has its own DIV with its own info and stuff, and when i go to another button like USA, MUNDIALES or any other, it will all HIDE and it will apear the other button with its own tabs and it happens all againg with the other button.

Corrosive
07-22-2008, 05:33 PM
You need to add show/hide elements behaviour to all the other buttons/tabs to hide your Div. I.e. hide on mouseover or click. Otherwise it will hang around like a bad smell.

It's pretty logical really :wink: .

Chapo
07-22-2008, 08:11 PM
Thats kind of weird... i made a test with Nested Layers and it worked, but for some reason it failed in my page. But what you said also works but its the hard and long way to do it. Its Suposed to Hide the DIV with all other DIV's inside of it without the need of doin it one by one. But if it doesn't work like it did in my test i will have to do it the way you said.

Corrosive
07-22-2008, 08:21 PM
Thats kind of weird... i made a test with Nested Layers and it worked, but for some reason it failed in my page. But what you said also works but its the hard and long way to do it. Its Suposed to Hide the DIV with all other DIV's inside of it without the need of doin it one by one. But if it doesn't work like it did in my test i will have to do it the way you said.

Did you use 'inherit' so that the layers take on the state of the parent by any chance?

Chapo
07-23-2008, 04:42 AM
Nop.... let me give it try Sir. Corrosive