p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

beginning_php thread: Replacing On Browser CSS, etc.

Message #1 by Jefferis Peterson <jefferis@p...> on Tue, 15 Oct 2002 15:33:29 -0400
In traditional javascript, you can direct CSS styles based upon platform:
> tmt_css_Mac = "/Library/joden.css";
> tmt_css_Win = "/Library/jodenwin.css";
> if((navigator.appVersion.indexOf("Mac")!= -1)){
>  document.write("<link rel='stylesheet' href='" + tmt_css_Mac + "'
> type='text/css'>");
> }
> else{
>  document.write("<link rel='stylesheet' href='" + tmt_css_Win + "'
> type='text/css'>");
> }//tmtC_cssOnPlatformEnd

I don't want to reinvent the wheel. Has a good script been written to do
redirects based upon browser/platform/ or resolution in php? Or is it better
to use javascript hacks for this?

The reason I'm asking is that I find on standard WIN monitors, my popup
window is being placed too low on the screen because of all the toolbar
clutter at the top of the IE browser and the bottom of the window is being
hidden by the WIN toolbar.
I was thinking of replacing the popup win dimensions with a php function
based upon the browser platform.


Jefferis Peterson, Pres.
Web Design and Marketing
Tel .  xxx-xxx-xxxx
ICQ 19112253

http://www.Slippery-Rock.com - 7,000 hits per year

  Return to Index