[thelist] CSS

Gary Finnigan gfinnigan at talk21.com
Sun Jun 10 22:07:21 CDT 2001


Unfortunately I use ASP not PHP. But thanks for the idea.

regards
Gary
----- Original Message -----
From: Charles F. Johnson <charles at littlegreenfootballs.com>
To: <thelist at lists.evolt.org>
Sent: Monday, June 11, 2001 1:56 AM
Subject: Re: [thelist] CSS


> Gary Finnigan <gfinnigan at talk21.com> typed:
>
> > I am in the process of using a CSS file to control the 'normal' part of
the
> > site. I would like people to be able to click on a link and load in a
> > different style sheet that will allow them to view a greater font size.
> > I know this can be done, but don't know how.
> > Can anyone help?
>
> if you can use PHP on this site, it's pretty easy. just make links to the
> various stylesheets like so:
>
> <a href="mypage.php?css=style1.css">Tiny fonts</a>
> <a href="mypage.php?css=style2.css">Readable fonts</a>
> <a href="mypage.php?css=style3.css">Huge fonts</a>
>
> then in the <head> section of your page, where you'd normally put the link
> to the stylesheet, use something like this instead:
>
> <?php
> if (isset($css)) {
>   echo "<link rel=\"stylesheet\" href=\"$css\" type=\"text/css\">\n";
> } else {
>   echo "<link rel=\"stylesheet\" href=\"default.css\"
type=\"text/css\">\n";
> }
> ?>
>
> if you want to get extra fancy, you could also use cookies to store the
> user's prefs and set them automatically when they return.
>
> charles johnson
> lgf web design
> http://littlegreenfootballs.com
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>





More information about the thelist mailing list