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

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

am 20.06.2007 20:57:47 von Rich Bradshaw

Hi,

Sorry about the long title - I have a page with a navbar on. I would
like like to make it so that the links that link to the page the user
is on are a different color.

The problem is, that I want to keep the menu in a file so that I can
server side include it, so I don't want to have to change it manually
for each page.

To help explain this, the page looks like this:

www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



Contact
media="screen" />



















Where menu.php looks like this:



Obviously there is some css formatting here as well.

If we are on contact.php, I want the link to contact.php to be styled
differently so that we know where we are.

Is there any way to do this without getting rid of the server side
include or drastically making the site more complex?

Thanks a lot,

Rich

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

am 20.06.2007 21:44:26 von a.nony.mous

Rich Bradshaw wrote:

> Sorry about the long title - I have a page with a navbar on. I would
> like like to make it so that the links that link to the page the user
> is on are a different color.
>
> The problem is, that I want to keep the menu in a file so that I can
> server side include it, so I don't want to have to change it manually
> for each page.

Like this: http://countryrode.com/ ?

> To help explain this, the page looks like this:


> Obviously there is some css formatting here as well.
>
> If we are on contact.php, I want the link to contact.php to be styled
> differently so that we know where we are.
>
> Is there any way to do this without getting rid of the server side
> include or drastically making the site more complex?

I do this by assigning a variable to each page. Place this before
calling the include. Such as:

$imenu = 1; // Number of this page and menu item

Then the menu include file uses:

echo "

\n";
echo "
    \n";
    /* Each menu button */
    if ($imenu<>1) { echo "
  • \n";
    } else { echo "
  • Home
  • \n";}

    ...with subsequent lines in the include for each of the items. Each is
    just one long line (not wrapped). The next:

    if ($imenu<>2) { echo "
  • In The
    Shop
  • \n"; } else { echo "
  • In the
    Shop
  • \n";}

    ...and so forth, and ends with:

    echo "
\n";
echo "
\n";

Class 'mbreak' just shows the word in a different color. Note that the
button is not a clickable link to the same page.

If you have pages that are not on the menu, e.g. called from a link in
the content somewhere, use: $imenu = 0;

There may be easier ways, but this is what I came up with on the spur of
the moment several years ago.

--
-bts
-Motorcycles defy gravity; cars just suck

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

am 20.06.2007 21:51:29 von Neredbojias

On Wed, 20 Jun 2007 18:57:47 GMT Rich Bradshaw scribed:

> Hi,
>
> Sorry about the long title - I have a page with a navbar on. I would
> like like to make it so that the links that link to the page the user
> is on are a different color.
>
> The problem is, that I want to keep the menu in a file so that I can
> server side include it, so I don't want to have to change it manually
> for each page.

I think the way I'd approach it is to id the menu links and style an
exception on each page.

--
Neredbojias
He who laughs last sounds like an idiot.

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

am 20.06.2007 22:19:30 von Emma.M.L.Russell

That's a good idea - prob what I'll use!

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

am 20.06.2007 23:08:38 von Rich Bradshaw

Both good ideas, like the CSS exclusion technique, seems simpler, but
depends on whether I can work it out!

Thanks for your help! I'll likely use some combination of both.

Richard

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

am 20.06.2007 23:35:54 von Rich Bradshaw

Ok, got it working using the CSS method - nice and neat. Just used a



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!

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

am 21.06.2007 01:54:56 von BootNic

> Rich Bradshaw wrote:
> news: 1182365867.888535.188240@k79g2000hse.googlegroups.com
> Hi,
>
> Sorry about the long title - I have a page with a navbar on. I would
> like like to make it so that the links that link to the page the user
> is on are a different color.
>
> The problem is, that I want to keep the menu in a file so that I can
> server side include it, so I don't want to have to change it manually
> for each page.
>
> To help explain this, the page looks like this:
[snip]
> Where menu.php looks like this:
[snip]
>
> Obviously there is some css formatting here as well.
>
> If we are on contact.php, I want the link to contact.php to be styled
> differently so that we know where we are.
>
> Is there any way to do this without getting rid of the server side
> include or drastically making the site more complex?

You appear to be using php, I suggest you go ahead and put it to work.

You will still need a style class for the current link, that will fit nicely
in your current style sheet.

The menu.php could look something like this:

$PHP_SELF = $_SERVER['PHP_SELF'];;
$navLinks = Array(
'home'=>'/temp/prev12~.php',
'our approach'=>'/approach.php',
'products & services'=>'/products.php',
'gallery'=>'/gallery.php',
'prices'=>'/prices.php',
'booking'=>'/booking.php',
'contact'=>'/contact.php',
'links'=>'links.php'
);
?>



--
BootNic Wednesday, June 20, 2007 7:54 PM

War does not determine who is right, war determine who is left.
*Ancient Chinese Proverbs*

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

am 21.06.2007 06:18:47 von Neredbojias

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
>
>
>
> 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:



All pages to contain the include ("menu") have a very similar include
link. Here's the example for page 2:

?>

Notice the "?exclude=" variable contains the page identifier. Otherwise,
the includes are identical.

Here's a link to a live "page 2" example incorporating the above
techniques:

http://www.neredbojias.com/zyxix/page2_t5.php

Two things I like about this are that the search/query string only has to
be on the include link, not the page link, and the styling change is
incorporated in the menu, not each page. The code could be changed a bit
if you're worried about global variables, etc.

--
Neredbojias
He who laughs last sounds like an idiot.

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

am 21.06.2007 07:13:26 von Adrienne Boswell

Gazing into my crystal ball I observed Rich Bradshaw
writing in news:1182365867.888535.188240
@k79g2000hse.googlegroups.com:

> Hi,
>
> Sorry about the long title - I have a page with a navbar on. I would
> like like to make it so that the links that link to the page the user
> is on are a different color.
>
> The problem is, that I want to keep the menu in a file so that I can
> server side include it, so I don't want to have to change it manually
> for each page.
>

This is what I do, and it works very well. At the top of each page:

$thispage = "The title of the page, for title and first level heading";
$thisurl = "theactualurl.php";

Then as I loop through the menu, if the url of the menu item is the same
as $thisurl, then it gets a class of current page, and is styled
accordingly.

The reason that I assign it a class is that I might have a menu on the
bottom of the page as well, and as it might use a different div id, the
class can be used again, and could, or could not be styled diffently, eg;

ul#menu.current {border:1px solid #000;}
ul#footer.current {border:1px dotted #000;}

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

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

am 21.06.2007 12:37:15 von Andy Dingley

On 20 Jun, 19:57, Rich Bradshaw wrote:

> Sorry about the long title -

It did rather confuse me. I thought you'd be talking about links with
only fragment identifiers (i.e. same page) rather than a navigation
menu and a notion of "current selection" on the menu (which doesn't
even need to always be to the same page)

> I have a page with a navbar on. I would
> like like to make it so that the links that link to the page the user
> is on are a different color.

  • ...


  • Simple, works beautifully.

    > The problem is, that I want to keep the menu in a file so that I can
    > server side include it, so I don't want to have to change it manually
    > for each page.

    Not so easy, but still a well-known problem


    ....

    ...



    ...

    ....

    And in the CSS,

    li.current,
    ..page-foo .nav-foo,
    ..page-bar .nav-bar,
    ..page-bat .nav-bat
    { background-color: red; }

    Obviously you tweak the parent element of each page differently, but
    that's easy

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

    am 21.06.2007 16:30:49 von rf

    "Neredbojias" wrote in message
    news:Xns9955D8CEFCFBBnanopandaneredbojias@198.186.190.161...
    > 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
    >>
    >>
    >>
    >> 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:
    >
    >

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

    am 22.06.2007 00:17:49 von dorayme

    In article ,
    "rf" wrote:

    > --
    > Richard (nine hours behind)

    It's getting worse, Telstra punishing you for your impudence in
    complaining to them about the former 6 hour delay?

    --
    dorayme

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

    am 22.06.2007 04:26:16 von Neredbojias

    On Thu, 21 Jun 2007 14:30:49 GMT rf scribed:

    >> 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:
    >>
    >>

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

    am 22.06.2007 05:59:34 von BootNic

    > Neredbojias wrote:
    > news: Xns9956C5BC4E732nanopandaneredbojias@198.186.190.161
    > On Thu, 21 Jun 2007 14:30:49 GMT rf scribed:
    [snip]
    >> $page =
    >> array_shift(explode('.',array_pop(explode('/',$_SERVER['PHP_ SELF']))));
    >
    > Uh, who do you think I am, -Einstein?
    > I'd take it kindly if you'd please explain the above in detail so my
    > headache would go away and I could get back to watching those reruns
    > of "The Three Stooges" I enjoy so much...
    [snip]

    Work the statement from right to left.

    Server variables: $_SERVER['PHP_SELF']
    The filename of the currently executing script, relative to the document
    root. For instance, $_SERVER['PHP_SELF'] in a script at the address
    http://example.com/test.php/foo.bar would be /test.php/foo.bar.

    explode('/',$_SERVER['PHP_SELF'])
    explode Split a string by string returns an array of strings
    returns array('temp','mydri','index.php')

    array_pop(explode('/',$_SERVER['PHP_SELF']))
    array_pop() pops and returns the last value of the array...
    returns 'index.php'

    explode('.',array_pop(explode('/',$_SERVER['PHP_SELF'])))
    explode Split a string by string returns an array of strings
    returns array('index','php')

    array_shift(explode('.',array_pop(explode('/',$_SERVER['PHP_ SELF']))))
    array_shift() shifts the first value of the array off and returns it...
    returns 'index'

    --
    BootNic Thursday, June 21, 2007 11:58 PM

    Our earth is degenerate in these latter days; bribery and corruption
    are common; children no longer obey their parents; and the end of the
    world is evidently approaching.
    *Assyrian clay tablet 2800 B.C.*

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

    am 22.06.2007 14:01:24 von rf

    "Neredbojias" wrote in message
    news:Xns9956C5BC4E732nanopandaneredbojias@198.186.190.161...
    > On Thu, 21 Jun 2007 14:30:49 GMT rf scribed:
    >
    >> $page =
    >> array_shift(explode('.',array_pop(explode('/',$_SERVER['PHP_ SELF']))));
    >
    > Uh, who do you think I am, -Einstein?\
    > I'd take it kindly if you'd please explain the above in detail so my
    > headache would go away and I could get back to watching those reruns of
    > "The Three Stooges" I enjoy so much...

    Er, N, it's all in the RTFM.

    Start from the inside out...

    $_SERVER['PHP_SELF'] contains the path of the current file, from the web
    root IIRC, something like
    /folder/folder/file.ext

    _explode_ this into an array, delimited by /

    folder,
    folder,
    file.ext

    _array-pop_ the *last* element in the array

    file.ext

    explode this on .

    file,
    ext

    _array_shift_ the *first* entry out of this array

    file

    On looking at the above (written the odd several years ago) I admit the
    whole thing should now be shortened into a preg_match() or two. May do that
    some day. Then again I now my create menus directly from the database and
    the routines that access that database know *exactly* what "page" they are
    in and they know *precicely* how to write the HTML that will, in due couse,
    be selected by the appropriate CSS rules.

    > This part I get: ternary (sp?) conditionals, not much different than my
    > example.

    True. Just a different programmers coding expression of the "algorithm".

    >> Next stage is to wrap it up in a nice pretty function.
    >
    > Sure. I can't wait to have at it...

    echo "

      \r\n";
      menuitem('page1','Page 1');
      menuitem('page2','Page 2');
      echo "
    \r\n";

    The expression of function menuitem($page,$text) is up to you :-)

    --
    Richard.

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

    am 22.06.2007 22:19:15 von Neredbojias

    On Fri, 22 Jun 2007 03:59:34 GMT BootNic scribed:

    >> Uh, who do you think I am, -Einstein?
    >> I'd take it kindly if you'd please explain the above in detail so my
    >> headache would go away and I could get back to watching those reruns
    >> of "The Three Stooges" I enjoy so much...
    > [snip]
    >
    > Work the statement from right to left.
    >
    > Server variables: $_SERVER['PHP_SELF']
    > The filename of the currently executing script, relative to the
    > document root. For instance, $_SERVER['PHP_SELF'] in a script at the
    > address http://example.com/test.php/foo.bar would be
    > /test.php/foo.bar.
    >
    > explode('/',$_SERVER['PHP_SELF'])
    > explode Split a string by string returns an array of strings
    > returns array('temp','mydri','index.php')
    >
    > array_pop(explode('/',$_SERVER['PHP_SELF']))
    > array_pop() pops and returns the last value of the array...
    > returns 'index.php'
    >
    > explode('.',array_pop(explode('/',$_SERVER['PHP_SELF'])))
    > explode Split a string by string returns an array of strings
    > returns array('index','php')
    >
    > array_shift(explode('.',array_pop(explode('/',$_SERVER['PHP_ SELF']))))
    > array_shift() shifts the first value of the array off and returns
    > it...
    > returns 'index'

    Okay, thanks, I pretty much get it now. The prob is I'm just not that
    familiar with php in depth. Sure, it's great, but I only use it when I
    convince myself I absolutely have to because it does produce a delay in
    rendering a page. While this delay is quite small, typically about a
    second or less, and is not particularly bothersome per se, the glaring
    white blank background displayed by most browsers during the wait is.
    Mozilla seems to be the only one of the major offerings that doesn't
    suffer from this anomoly.

    --
    Neredbojias
    He who laughs last sounds like an idiot.

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

    am 22.06.2007 22:25:33 von Neredbojias

    On Fri, 22 Jun 2007 12:01:24 GMT rf scribed:

    >>> $page =
    >>> array_shift(explode('.',array_pop(explode('/',$_SERVER['PHP_ SELF'])))
    >>> );
    >>
    >> Uh, who do you think I am, -Einstein?\
    >> I'd take it kindly if you'd please explain the above in detail so my
    >> headache would go away and I could get back to watching those reruns
    >> of "The Three Stooges" I enjoy so much...
    >
    > Er, N, it's all in the RTFM.
    >
    > Start from the inside out...
    >
    > $_SERVER['PHP_SELF'] contains the path of the current file, from the
    > web root IIRC, something like
    > /folder/folder/file.ext
    >
    > _explode_ this into an array, delimited by /
    >
    > folder,
    > folder,
    > file.ext
    >
    > _array-pop_ the *last* element in the array
    >
    > file.ext
    >
    > explode this on .
    >
    > file,
    > ext
    >
    > _array_shift_ the *first* entry out of this array
    >
    > file

    I think my troubles were that I just couldn't intuitively get a handle on
    $_SERVER['PHP_SELF'] because the FM didn't give any usage examples (which
    I could find), and I'd never even heard of "explode" before. Your
    explanation clarifies it beautifully although excessive nesting still
    makes me a little bird-brained. 'Tis, indeed, a clever sequence of
    functions to derive the active client page filename.

    > On looking at the above (written the odd several years ago) I admit
    > the whole thing should now be shortened into a preg_match() or two.

    I've used that in the past for browser-sniffing. Worked fine if one was
    careful enough in setting the _whole_ thing up.

    > (snip)
    > echo "

      \r\n";
      > menuitem('page1','Page 1');
      > menuitem('page2','Page 2');
      > echo "
    \r\n";
    >
    > The expression of function menuitem($page,$text) is up to you :-)

    I notice you use \r\n where I typically use just \n (which seems to
    suffice.) Do you think it makes any difference?

    Thanks for the fine explanation.

    --
    Neredbojias
    He who laughs last sounds like an idiot.

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

    am 22.06.2007 23:26:37 von a.nony.mous

    Neredbojias wrote:

    > Okay, thanks, I pretty much get it now. The prob is I'm just not that
    > familiar with php in depth. Sure, it's great, but I only use it when
    > I convince myself I absolutely have to because it does produce a
    > delay in rendering a page. While this delay is quite small,
    > typically about a second or less, and is not particularly bothersome
    > per se, the glaring white blank background displayed by most browsers
    > during the wait is.

    You must be doing something wrong.

    > Mozilla seems to be the only one of the major offerings that doesn't
    > suffer from this anomoly.

    Most of my pages are done with PHP, and I do not experience what you
    describe, with any browser.

    --
    -bts
    -Motorcycles defy gravity; cars just suck

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

    am 23.06.2007 10:39:11 von rf

    "Neredbojias" wrote in message
    news:Xns995788939B826nanopandaneredbojias@198.186.190.161...
    > On Fri, 22 Jun 2007 12:01:24 GMT rf scribed:

    >> echo "

      \r\n";
      >> menuitem('page1','Page 1');
      >> menuitem('page2','Page 2');
      >> echo "
    \r\n";
    >
    > I notice you use \r\n where I typically use just \n (which seems to
    > suffice.) Do you think it makes any difference?

    Hang over from my real job, spitting out C++/C# code where the \r is usually
    mandatory. Try sending just a \n to a printer. True, who sends stuff to a
    real printer these days, but I did thirty years ago when I started to really
    learn how to program :-) IBM systems back then of course with really small
    numbers like system/370 model 135 (about as powerfull as a 80368).

    Also many MS utilities (read: notpad which what you get from a view->source
    in IE) require the \r.

    It doesn't hurt the *nix systems.

    --
    Richard.

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

    am 23.06.2007 13:05:56 von Neredbojias

    On Fri, 22 Jun 2007 21:26:37 GMT Beauregard T. Shagnasty scribed:

    > Neredbojias wrote:
    >
    >> Okay, thanks, I pretty much get it now. The prob is I'm just not that
    >> familiar with php in depth. Sure, it's great, but I only use it when
    >> I convince myself I absolutely have to because it does produce a
    >> delay in rendering a page. While this delay is quite small,
    >> typically about a second or less, and is not particularly bothersome
    >> per se, the glaring white blank background displayed by most browsers
    >> during the wait is.
    >
    > You must be doing something wrong.

    If you were ever a woman in a past life, we might have been married.

    >> Mozilla seems to be the only one of the major offerings that doesn't
    >> suffer from this anomoly.
    >
    > Most of my pages are done with PHP, and I do not experience what you
    > describe, with any browser.

    Okay, I checked Opera and found to my amazement that I didn't have the
    default bg set (-or rather, it was set to white.) 'Could've swore I set
    that, but it was several updates ago so the Opera company is probably the
    one at fault...

    That leaves ie6, which will be ie6. (Have ie7 on another box; will check
    it later.)

    There's still a delay, but with a dark bg, it's not too bad.

    --
    Neredbojias
    He who laughs last sounds like an idiot.

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

    am 23.06.2007 13:14:33 von Neredbojias

    On Sat, 23 Jun 2007 08:39:11 GMT rf scribed:

    >> I notice you use \r\n where I typically use just \n (which seems to
    >> suffice.) Do you think it makes any difference?
    >
    > Hang over from my real job, spitting out C++/C# code where the \r is
    > usually mandatory. Try sending just a \n to a printer. True, who sends
    > stuff to a real printer these days, but I did thirty years ago when I
    > started to really learn how to program :-) IBM systems back then of
    > course with really small numbers like system/370 model 135 (about as
    > powerfull as a 80368).
    >
    > Also many MS utilities (read: notpad which what you get from a
    > view->source in IE) require the \r.
    >
    > It doesn't hurt the *nix systems.

    Sure, I even remember having to do that a long time ago back when I had a
    printer (-all of which, afaik, need both line feeds and carriage returns to
    "proceed",) but got used to the \n alone from scripting the java. PHP is a
    relative newcomer but alike in many ways to j/s.

    --
    Neredbojias
    He who laughs last sounds like an idiot.

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

    am 23.06.2007 13:53:45 von dorayme

    In article
    ,
    Neredbojias wrote:

    > On Fri, 22 Jun 2007 21:26:37 GMT Beauregard T. Shagnasty scribed:
    >
    > >
    > > You must be doing something wrong.
    >

    Unlike Frank in

    > If you were ever a woman in a past life, we might have been married.

    --
    dorayme

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

    am 23.06.2007 16:49:15 von a.nony.mous

    Neredbojias wrote:

    > Beauregard T. Shagnasty scribed:
    >> Neredbojias wrote:
    >>
    >>> Okay, thanks, I pretty much get it now. The prob is I'm just not
    >>> that familiar with php in depth. ...
    >>
    >> You must be doing something wrong.
    >
    > If you were ever a woman in a past life, we might have been married.

    I don't think I'll answer that one...

    >>> Mozilla seems to be the only one of the major offerings that doesn't
    >>> suffer from this anomoly.
    >>
    >> Most of my pages are done with PHP, and I do not experience what you
    >> describe, with any browser.
    >
    > Okay, I checked Opera and found to my amazement that I didn't have
    > the default bg set (-or rather, it was set to white.) 'Could've
    > swore I set that, but it was several updates ago so the Opera company
    > is probably the one at fault...

    Normally, white is a modern browser's default background color. Earlier
    ones used grey, as I recall, old Netscapes, old IEs. In my most-used
    browsers, I always set something different, so I can see when authors
    forget to assign a background color. It makes for some interesting
    viewing.

    > That leaves ie6, which will be ie6. (Have ie7 on another box; will
    > check it later.)

    IE6 was white, as I recall.

    > There's still a delay, but with a dark bg, it's not too bad.

    If there is a delay that is truly caused by using PHP, you must be
    coding something odd, or it is your web server's fault. Mine all have no
    delay whatsoever, in any browser.

    --
    -bts
    -Motorcycles defy gravity; cars just suck

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

    am 24.06.2007 00:10:32 von Neredbojias

    On Sat, 23 Jun 2007 11:53:45 GMT dorayme scribed:

    > In article
    > ,
    > Neredbojias wrote:
    >
    >> On Fri, 22 Jun 2007 21:26:37 GMT Beauregard T. Shagnasty scribed:
    >>
    >> >
    >> > You must be doing something wrong.
    >>
    >
    > Unlike Frank in

    Frank wasn't so perfect as he was discreet. -Like me.

    >> If you were ever a woman in a past life, we might have been married.
    >

    --
    Neredbojias
    He who laughs last sounds like an idiot.

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

    am 24.06.2007 00:17:42 von Neredbojias

    On Sat, 23 Jun 2007 14:49:15 GMT Beauregard T. Shagnasty scribed:

    > Normally, white is a modern browser's default background color. Earlier
    > ones used grey, as I recall, old Netscapes, old IEs. In my most-used
    > browsers, I always set something different, so I can see when authors
    > forget to assign a background color. It makes for some interesting
    > viewing.

    Good idea. I usually go for dark gray or black (with light monochromatic
    text) - my preference.

    >> That leaves ie6, which will be ie6. (Have ie7 on another box; will
    >> check it later.)
    >
    > IE6 was white, as I recall.
    >
    >> There's still a delay, but with a dark bg, it's not too bad.
    >
    > If there is a delay that is truly caused by using PHP, you must be
    > coding something odd, or it is your web server's fault. Mine all have no
    > delay whatsoever, in any browser.

    Well, I've noticed delays (again - very small, from 0.5 to 2.0 secs appx.)
    on _all_ my php creations, so I guess it's the server, which is Yahoo. A
    second or so doesn't seem that bad to me as long as some glaring white
    background isn't blinding you in the interim.

    --
    Neredbojias
    He who laughs last sounds like an idiot.

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

    am 24.06.2007 00:54:19 von a.nony.mous

    Neredbojias wrote:

    > Beauregard T. Shagnasty scribed:
    >> If there is a delay that is truly caused by using PHP, you must be
    >> coding something odd, or it is your web server's fault. Mine all
    >> have no delay whatsoever, in any browser.
    >
    > Well, I've noticed delays (again - very small, from 0.5 to 2.0 secs
    > appx.) on _all_ my php creations, so I guess it's the server, which
    > is Yahoo.

    Oh. My condolences.

    > A second or so doesn't seem that bad to me as long as some glaring
    > white background isn't blinding you in the interim.

    Use off-white.

    --
    -bts
    -Motorcycles defy gravity; cars just suck