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!

Dreamweaver Layers

Status
Not open for further replies.

CharlotteL

IS-IT--Management
Apr 13, 2005
92
GB
I have a problem with my Layers.

I have an initial command that onload certain layers are hidden and others are shown - it works fine but I get a quick flash of all layers - do you know how I can stop the quick flash of the hidden layers?

This is my code:

Code:
body onload="MM_showHideLayers('Layer2','','show','Layer3','','show','Layer6','',
'show','Layer7','','show','Layer8','','show','Layer9',
'','show','Layer10','','hide','Layer11','','hide',
'Layer12','','hide','Layer13','','hide',
'Layer14','','hide','Layer15','','hide','
Layer16','','hide','Layer17','','hide',
'Layer18','','hide','Layer5','','show')">
 
Use CSS to have your layers be hidden from the start instead of having Javascript hide them after they are created.
Code:
.layerclass{
display:none;
}

or

.layerclass{
visibility:hidden;
}

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Thanks, this works for firefox but I still have a problem on IE with the initial flash. Is there an extra setting for IE - thanks alot.
 
Nope, should work for both. What version of IE are you testing this on?

Do you have a full and valid doctype at the start of your page?

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top