- This topic has 7 replies, 2 voices, and was last updated 15 years, 10 months ago by imported_Ryan.
-
AuthorPosts
-
January 29, 2009 at 8:38 am #594maidanetMember
My site uses a lot of transparent full color pngs. Using the WordPress template system, I was able to write different code for IE6 that shows a .jpg instead of the png.
Using PHP, I check the browser and includes a different template file if it is IE6. Like this:
[tt:28d36ryu]<?php $navigator_user_agent = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? strtolower( $_SERVER['HTTP_USER_AGENT'] ) : ''; ?>
<?php if (stristr($navigator_user_agent, "msie 6")){include (TEMPLATEPATH . '/searchform_ie6.php');}
else{include (TEMPLATEPATH . '/searchform.php');}?>[/tt:28d36ryu]Since I can’t use PHP in the multi level menu, I was wondering if there were a way I could choose the Custom Code when I check the browser settings.
It’s late and I might not be making sense…
My CSS is in the plug in settings page:
[tt:28d36ryu]#suckerfishnav {font-size:18px;font-family:verdana,sans-serif;font-weight:bold;}
#suckerfishnav, #suckerfishnav ul {float:left;list-style:none;padding:0;margin:0;width:103px;}
#suckerfishnav a {display:block;color:#ffffff;text-decoration:none;padding:0;}
#suckerfishnav li {float:left;padding:0;}
#suckerfishnav ul {position:absolute;left:-999em;height:auto;width:103px;font-weight:normal;margin:0;border:0;}
#suckerfishnav li:hover, #suckerfishnav li.sfhover {color:#000000;}#suckerfishnav li li {width:100px;font-weight:bold;font-family:arial,sans-serif;text-align:left;}
#suckerfishnav li li a {padding:5px;width:90px;font-size:11px;color:#ffffff;}#suckerfishnav li ul ul {margin:0;}[/tt:28d36ryu]
January 31, 2009 at 4:35 am #5087imported_RyanMemberI don’t intend to add any browser targetting systems to the plugin.
I generally recommend using IE conditional comments to control background images displayed as a way of coping with the lack of PNG transparency support in IE6. I don’t see any point in using JPEG’s for that though as they don’t support transparencies either, GIF is usually the alternate file type.
February 1, 2009 at 1:19 am #5088maidanetMemberUsing transparent gifs are not an option in this case for some of the images because 255 colors is not enough to render the designer’s button images.
I’m actually not looking for a browser targeting system.
Right now, I’m doing the browser checking myself and using different template php files in the same theme. topnav_ie6.php for IE6 and topnav.php for other browsers, for example.
I’m just looking for a way to use a different custom code for the same menu.
February 1, 2009 at 3:07 am #5089imported_RyanMemberI’m totally lost then. If you aren’t doing browser sniffing, then what do you have seperate template files for? I am confused.
February 1, 2009 at 5:52 am #5090maidanetMember[quote:1udm5toq]I don’t intend to add any browser targetting systems to the plugin.[/quote:1udm5toq]
I was just clarifying that I wasn’t asking for one from you.
I just thought there might be a way that I could choose from Custom HTML 1 or Custom HTML 2 for a particular navigation bar.
I happen to be browser sniffing, but there could be other conditions where one might want different looks for different situations.
No worries. I can find a work-around. ” title=”Smiley” />
February 1, 2009 at 8:21 am #5091imported_RyanMemberYou could serve one menu to one set of browsers, and another to other browsers. There is an option in the latest versions of the plugin which allows you to have two entirely different menus.
February 1, 2009 at 5:19 pm #5092maidanetMemberI think you sent me that answer telepathically, because I woke up this morning and that very solution came to me!
Clearly I need a life outside of website work.
Thanks for a great plug in!
Maida
February 1, 2009 at 5:24 pm #5093imported_RyanMemberGlad to hear you found a solution ” title=”Smiley” />
-
AuthorPosts
- You must be logged in to reply to this topic.