Re: Change color of links that have a target of the page on which they are found.




"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)


.



Relevant Pages

  • Re: Change color of links that have a target of the page on which they are found.
    ... got it working using the CSS method - nice and neat. ... In the header on the home page, changing home as relevant. ... on navbar has id="XXX" in it, where XXX would be home for this page. ...
    (alt.html)
  • Re: [slrn] Now Finicky About X-Face Headers?
    ... Reason I ask is that I notice my references and X-face line wrap at the ... Since you DO want the header to wrap? ... okay...maybe it technically is the pager that slrn's posting from. ... When encoded 8bit characters are present, slrn folds header lines that ...
    (news.software.readers)
  • Re: Removing CRLF in detail section
    ... The Manufacturer is one header and their ... Does Reports Line wrap after each section IE after each ... >>> MS Access MVP ...
    (microsoft.public.access.reports)
  • Re: [slrn] Now Finicky About X-Face Headers?
    ... Reason I ask is that I notice my references and X-face line wrap at the ... Since you DO want the header to wrap? ... This variable controls what text is wrapped IN THE ARTICLE PAGER when ... When encoded 8bit characters are present, slrn folds header lines that ...
    (news.software.readers)
  • Re: Question for Ryk Spoor
    ... to wrap around for you, but the header is a fixed size at the moment, ... trying to wrap, just not wrapping *enough*. ... I'll get back to debugging the website. ... Kay Shapero ...
    (rec.arts.sf.written)