Click to See Complete Forum and Search --> : layers / css


frazi
01-07-2004, 02:33 PM
Hello
First of all, i would like to apologize if what im asking might be a bit silly, but i ask coz i dont know how to do it

1. how do you make design / layout using layer / css so that it could become like hirearchial display where it could be hidden or shown when you click on it?

as an example, here is an url where this has been done:
http://www.prestigen.biz/501.htm

look at the introduction to forex with the plus image at its side, and when u click the "+" image, the layer unwraps and u can see the content and when u click again the "-" image the layer will dissapear.

please help me. thank you.
my email is frazi@streamyx.com

leatherback
01-07-2004, 02:44 PM
Hi,

Please remember that thsi is a PhP forum..

Anyway. the trick you saw there is done with a combination of javascript and css. When you click an element, this function is called:

<SCRIPT language=JavaScript>
function exd(o){
d = document.getElementById("gd" + o)
i = document.getElementById("pl" + o)
if(d.className=="gd"){
d.className="gde"
i.src="images/m.gif"}
else{
d.className="gd"
i.src="images/p.gif"
}

(Yes, i copied it from their source code).

J.