1
Gynther
Re: Polish your theme CSS files
  • 2003/5/31 14:25

  • Gynther

  • Just popping in

  • Posts: 8

  • Since: 2003/5/21


Making webpages look good cross-platform can be nightmare. I usually try and fix it with a little help from PHP and include a separate CSS file depending on which browser is used. This helps, me at least , to organize my stylesheets better. I make a version for each browser I wish to support and that does not comply with eachother and insert the following PHP code snippet:

if(strstr($HTTP_USER_AGENT, "Mozilla")){$user_agent = "Mozilla";}
if(strstr($HTTP_USER_AGENT, "Konqueror")){$user_agent = "Konqueror";}
if(strstr($HTTP_USER_AGENT, "IE")){$user_agent = "IE";}


and

echo("\n");

into the .php file. This way of course doesn't work if the user chooses to mask his/her browser as anotherone but that is more or less out of ones control. This also means that the CSS files have to be named like for instance "stylesheet_Mozilla".

Oh, and thanks sunsnapper for the tip about sizes. I was looking for that somewhere.




TopTop



Login

Who's Online

178 user(s) are online (109 user(s) are browsing Support Forums)


Members: 0


Guests: 178


more...

Donat-O-Meter

Stats
Goal: AU$15.00
Due Date: Jul 31
Gross Amount: AU$0.00
Net Balance: AU$0.00
Left to go: AU$15.00
Make donations with PayPal!

Latest GitHub Commits