Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   [SOLVED] Custom CSS for IE6, IE7 and others (http://forum.bytesforall.com/showthread.php?t=11311)

etzo Nov 22, 2010 04:30 AM

[SOLVED] Custom CSS for IE6, IE7 and others
 
Hello,

first of all sorry for my bad english, i found a php script for detecting browsers. Now i need to do following algorithm:

if IE below IE7 -> load ONLY my custom CSS,
else -> load normal atahualpa css.

I know how to implement this script I just don't know exact place to put it I think I have to put code somewhere in header.php, but I don't know where.

Thanks in advance for suggestions,
Vedran

juggledad Nov 22, 2010 05:19 AM

CHECK OUT THE OPTIONS AT ATO->Add HTML/CSS Inserts

etzo Nov 22, 2010 06:20 AM

Quote:

Originally Posted by juggledad (Post 49964)
CHECK OUT THE OPTIONS AT ATO->Add HTML/CSS Inserts

Thanks for quick reply, I know that I can include custom styles there ;)

but i think that i must edit header.php or something like that because in IE 6 or IE7 case i must load only my own hand made CSS, because i have divs for "fancy looking" boxes on pages and i must rewrite CSS Inserts for that divs because they don't look good in IE 6 and IE 7 ;)

And because of SEO i cant have two "separate" pages one for "< ie7" and second for new browsers...

So what i basically need to do is add this code:

if (ie below ie 7)
echo "<link rel="stylesheet" href="http://localhost/MyOwnCssForIE.css" type="text/css" media="all" />"

else

echo "<link rel="stylesheet" href="http://localhost/?bfa_ata_file=css" type="text/css" media="all" />"

Once more sorry for wasting your time ;)

Thanks

etzo Nov 22, 2010 06:38 AM

Quote:

Originally Posted by juggledad (Post 49964)
CHECK OUT THE OPTIONS AT ATO->Add HTML/CSS Inserts

OMG, I cant belive what idiot I am :)

I was looking on it whole the time in header.php:

Code:

<link rel="stylesheet" href="<?php bloginfo('url'); ?>/?bfa_ata_file=css" type="text/css" media="all" />
sorry for wasting your time ;)

and thanks for the help :)

Cheers

juggledad Nov 22, 2010 06:51 AM

you should try editing header.php and look for lines 10-12 (version 3.5.3) which should be
HTML Code:

<?php if ( $bfa_ata['css_external'] == "External" ) { ?>
<link rel="stylesheet" href="<?php bloginfo('url'); ?>/?bfa_ata_file=css" type="text/css" media="all" />
<?php } ?>

and add your if statements in there.


All times are GMT -6. The time now is 10:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.