should be fine.  I end with .php as my editor is much friendlier with that.

See: www.dartmouthdigital.com/phpclass/week3.php.
This class project was to deliver different content based on browsers, so
you'll get one of 6 themes.  In each of the themes, the banner is selected
randomly - via css background images in a separate "random image css file."

for your variant, if not using a DB, and without getting too tricky (because
I'm really new to php!):

build an array with the link and text, (from a text /xml file or php include
files that you've taught your users to do)
name the images by number - matching the array position.
         -- or two arrays with a better file name -- or someone teach me how
to do more than two dimensions in a php array.  )
select two random numbers - make sure they're not the same.
create the css plugging in the correct file name,
create the html code plugging in the correct text and link name

Code page is linked from the demo.

Linda

----- Original Message ----- 
From: "Stephen Stagg" <[EMAIL PROTECTED]>
To: <wsg@webstandardsgroup.org>
Sent: Thursday, December 08, 2005 5:24 PM
Subject: Re: [WSG] Dynamic Styles - Inline? What?


> In fact, I chickened out and used the IMG tag solution.  however....
>
>   My web host uses PHP as a CGI module, I think, therefore, that it only
> handles files with .php extension?
>
> Stephen
>
> Linda Harms wrote:
> > Stephen,
> >
> > Several options actually are available on the PHP side.
> >
> >   -- you CAN script the CSS to select the appropriate background image.
> >   -- multiple css files, use php to call the appropriate one.
> >
> >
> > I have an example available if you're interested.
> >
> > Linda
> > (breaking away from normal lurk mode)
> > ----- Original Message ----- 
> > From: "Stephen Stagg" <[EMAIL PROTECTED]>
> > To: "WSG" <wsg@webstandardsgroup.org>
> > Sent: Thursday, December 08, 2005 4:12 PM
> > Subject: [WSG] Dynamic Styles - Inline? What?
> >
> >
> >
> >> One site that I'm currently coding
(http://www.minimology.co.uk/everest)
> >> uses some simple PHP to manage a few dynamic elements on the pages.
> >>
> >> One of these elements (will be | is) 2 Sponsors logos at the top of
each
> >> page which will go into the template.  I want the links to be randomly
> >> selected from a list and to use an FIR derivation to show the relevant
> >> company logos in an accessible manner.  I also, however, want the user
> >> to be able to edit an xml file describing the attributes of the various
> >> sponsors and to add new ones.  Normally I would define the FIR images
in
> >> a linked x.css file but this is not scriptable.  How does the list
> >> suggest the tags should be styled in this case?
> >>  * Inline stylesheets?
> >>  * Linked ".php" with content-type of text/css?
> >>  * style="" attribute?
> >>
> >> Any thoughts??
> >>
> >> Thanks
> >>
> >> Stephen
> >> ******************************************************
> >> The discussion list for  http://webstandardsgroup.org/
> >>
> >>  See http://webstandardsgroup.org/mail/guidelines.cfm
> >>  for some hints on posting to the list & getting help
> >> ******************************************************
> >>
> >>
> >>
> >>
> >>
> >> -- 
> >> No virus found in this incoming message.
> >> Checked by AVG Free Edition.
> >> Version: 7.1.371 / Virus Database: 267.13.12/194 - Release Date:
12/7/2005
> >>
> >>
> >>
> >
> >
> >
> >
>
> ******************************************************
> The discussion list for  http://webstandardsgroup.org/
>
>  See http://webstandardsgroup.org/mail/guidelines.cfm
>  for some hints on posting to the list & getting help
> ******************************************************
>
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.371 / Virus Database: 267.13.12/194 - Release Date: 12/7/2005
>
>



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.13.12/194 - Release Date: 12/7/2005

******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to