Log in

View Full Version : detect and change css



wei803
05-08-2006, 03:47 AM
hi all, this is my first post. I hope someone can help me out here.
I have some simple php pages that have a inserted section "link_a.php".
I would like to know how to change the CSS on a link inside "link_a.php" when a different page loaded with "link_a.php" inserted.

djr33
05-08-2006, 04:01 AM
Do you have a link to your page? Your question is quite vague.

really, it's very hard to tell what is part of a page. If "what is on a page" is determined by php in the first place, it's a lot easier. There needs to be a key of some sort, or you just need to search through all the code... which is no fun.

Basically....


<a href="
<?php
if (your condition) {
echo $linkvar;
}
?>
">link</a>
...in simplest terms.