Page 1 of 1

How did they do this?

Posted: Mon Nov 25, 2002 4:31 pm
by anomaly
I don't really know where to post this because I don't know what they're doing! Forgive me if this is in the wrong section.

http://www.horizoncompanies.com/section ... vices.html

Ok, I understand the drop down menu at the top. That simply javascript. But check out the Services menu on the left. Each time you go to a different service, that service is highlighted in orange and the image changes to an orange image.

How could you achieve this affect without hard coding each page like this? I know they didn't do that because if they wanted to add a link they'd have to update every single page...there has to be a better way.

Thanks!

Posted: Mon Nov 25, 2002 4:54 pm
by kcomer
The menu may be an include, I'm sure it is, and it probobly just has code in it that checks which page the user is at, maybe using PHP_SELF and switch statements or nested if statements.

Posted: Mon Nov 25, 2002 5:08 pm
by anomaly
Shouldn't the extension be .php then? Or is that optional?

Posted: Mon Nov 25, 2002 5:19 pm
by hob_goblin
anomaly wrote:Shouldn't the extension be .php then? Or is that optional?
thats a webserver setting... i could make files.anyfileextension run php

It done with style sheets

Posted: Tue Nov 26, 2002 6:34 am
by kaka
If you look at the source code on the page you will see a reference to ****.css. This is a cascading style sheet that allows you to build pages / boxes / fontstyles etc from 1 script. While you will not be able to see their style sheet directly - the bit you are interested in is HOVER and if you look up CSS on the web you should get a full explanation of how to do this.

Posted: Tue Nov 26, 2002 8:13 am
by penguinboy