Re: Change color of links that have a target of the page on which they are found.
- From: "rf" <rf@xxxxxxxxxxx>
- Date: Thu, 21 Jun 2007 14:30:49 GMT
"Neredbojias" <neredbojias@xxxxxxxxx> wrote in message
news:Xns9955D8CEFCFBBnanopandaneredbojias@xxxxxxxxxxxxxxxxxx
On Wed, 20 Jun 2007 21:35:54 GMT Rich Bradshaw scribed:
Ok, got it working using the CSS method - nice and neat. Just used a
<style type="text/css"><!--
a#home {
color: white !important;
}
--></style>
In the header on the home page, changing home as relevant. Each link
on navbar has id="XXX" in it, where XXX would be home for this page.
Simple.
Thanks very much!
After reading Beauregard's and BootNic's advices, I decided mine rather
suck... er, was inelegant. Ergo, I tried something better.
For example:
Your "menu" page to be included could look something like this:
<ul>
<li><? if ($exclude == 'page1') { ?><span
style="background:inherit;color:yellow;">Page 1</span><? } else { ?><a
href="page1.html">Page 1</a><? } ?>
<searches archives for things I used to do>
$page =
array_shift(explode('.',array_pop(explode('/',$_SERVER['PHP_SELF']))));
echo "<ul>\r\n";
echo ($page == "page1") ? "<li><span>Page 1</span></li>\r\n" : "<li><a
href='page1.php'>Page 1</a></li>\r\n";
echo ($page == "page2") ? "<li><span>Page 2</span></li>\r\n" : "<li><a
href='page2.php'>page 2</a></li>\r\n";
echo "</ul>\r\n";
Watch the wrap.
Style the <span>s and the <a>s to taste.
Next stage is to wrap it up in a nice pretty function.
--
Richard (nine hours behind)
.
- Follow-Ups:
- References:
- Change color of links that have a target of the page on which they are found.
- From: Rich Bradshaw
- Re: Change color of links that have a target of the page on which they are found.
- From: Neredbojias
- Re: Change color of links that have a target of the page on which they are found.
- From: Rich Bradshaw
- Re: Change color of links that have a target of the page on which they are found.
- From: Rich Bradshaw
- Re: Change color of links that have a target of the page on which they are found.
- From: Neredbojias
- Change color of links that have a target of the page on which they are found.
- Prev by Date: Re: FireBug (was Re: Heres the REAL reason a website doesn't work...)
- Next by Date: Page Breaks not working for table columns
- Previous by thread: Re: Change color of links that have a target of the page on which they are found.
- Next by thread: Re: Change color of links that have a target of the page on which they are found.
- Index(es):
Relevant Pages
|