View Full Version : Detect Browser Version
dac1117
Apr-24-2008, 05:53 AM
I have an issue where IE6 users have trouble viewing my site (which works fine in all other browsers). Any way for a script to display a message to IE6 users when they try to load my site? (www.woodfiredceramics.net)
Thx! :bow
Allen
Apr-24-2008, 06:23 AM
I have an issue where IE6 users have trouble viewing my site (which works fine in all other browsers). Any way for a script to display a message to IE6 users when they try to load my site? (www.woodfiredceramics.net (http://www.woodfiredceramics.net))
Thx! :bow
I had this some time ago for a warning only for IE.
In header
<div id="IEnotice">Mesage here.</a></div>
in CSS
#IEnotice {
display: none;
_display: block !important;
~display: block !important;
position: relative;
z-index: 99;
margin: 0 auto;
background: red;
width: 210px;
font-size: 80%;
text-align:center;
}
dac1117
Apr-24-2008, 06:40 AM
I had this some time ago for a warning only for IE.
In header
<div id="IEnotice">Mesage here.</a></div>
in CSS
#IEnotice {
display: none;
_display: block !important;
~display: block !important;
position: relative;
z-index: 99;
margin: 0 auto;
background: red;
width: 210px;
font-size: 80%;
text-align:center;
}
Thanks Allen - but can the message be displayed for only IE6 users since my site works fine in IE7?
Andy
Apr-24-2008, 06:47 AM
Thanks Allen - but can the message be displayed for only IE6 users since my site works fine in IE7?
A better question is why do you want to make your site so that a huge number of people might not see it? :scratch
What's the issue with your code and IE6?
Allen
Apr-24-2008, 06:47 AM
Thanks Allen - but can the message be displayed for only IE6 users since my site works fine in IE7?
Remove this line
~display: block !important;
dac1117
Apr-24-2008, 07:08 AM
A better question is why do you want to make your site so that a huge number of people might not see it? :scratch
What's the issue with your code and IE6?
Primarily the navBar code allthough I've checked it over-and-over and am at a loss for how to get it to work in IE6. Also, the bit of html below (from bioBox (http://woodfiredceramics.net)) will not display correctly (menu items should be one same line and not 'boxed' by span tags). Maybe there is additional IE6 code required for my navBar css? Thx for the help! :bow
<div id="artistMenu"><a href="http://woodfiredceramics.net/keyword/scott+parady+ceramics"><span class="eng"> work</span><span class="jpn"> 作品</span><span class="ger"> werken</span><span class="fre"> catalogue</span></a> | <a href="http://www.woodfiredceramics.net/gallery/4000107_MDgUy/1/267462231_dmAs2/Small"><span class="eng"> bio</span><span class="jpn"> 作家紹介</span><span class="ger"> biografie</span><span class="fre"> biographie</span></a> | <a href="http://woodfiredceramics.net/keyword/scott+parady+kiln"><span class="eng"> kiln</span><span class="jpn"> 窯</span><span class="ger"> oven</span><span class="fre"> </span></a> | <a href="http://www.woodfiredceramics.net/Process/360076"><span class="eng"> firings</span><span class="jpn"> firings</span><span class="ger"> firings</span><span class="fre"> firings</span></a> | <a href="mailto:sparady@csus.edu"><span class="eng"> contact</span><span class="jpn"> 連絡先</span><span class="ger"> contact</span><span class="fre"> contact</span></a></div>
Allen
Apr-24-2008, 07:28 AM
Primarily the navBar code allthough I've checked it over-and-over and am at a loss for how to get it to work in IE6. Also, the bit of html below (from bioBox (http://woodfiredceramics.net)) will not display correctly (menu items should be one same line and not 'boxed' by span tags). Maybe there is additional IE6 code required for my navBar css? Thx for the help! :bow
<div id="artistMenu"><a href="http://woodfiredceramics.net/keyword/scott+parady+ceramics"><span class="eng"> work</span><span class="jpn"> 作品</span><span class="ger"> werken</span><span class="fre"> catalogue</span></a> | <a href="http://www.woodfiredceramics.net/gallery/4000107_MDgUy/1/267462231_dmAs2/Small"><span class="eng"> bio</span><span class="jpn"> 作家紹介</span><span class="ger"> biografie</span><span class="fre"> biographie</span></a> | <a href="http://woodfiredceramics.net/keyword/scott+parady+kiln"><span class="eng"> kiln</span><span class="jpn"> 窯</span><span class="ger"> oven</span><span class="fre"> </span></a> | <a href="http://www.woodfiredceramics.net/Process/360076"><span class="eng"> firings</span><span class="jpn"> firings</span><span class="ger"> firings</span><span class="fre"> firings</span></a> | <a href="mailto:sparady@csus.edu"><span class="eng"> contact</span><span class="jpn"> 連絡先</span><span class="ger"> contact</span><span class="fre"> contact</span></a></div>
No need to turn off IE6, think we can get it working by fixing some things in
the html, ya game?
dac1117
Apr-24-2008, 07:37 AM
No need to turn off IE6, think we can get it working by fixing some things in
the html, ya game?
Bring it on!:barb
Allen
Apr-24-2008, 10:18 AM
Bring it on!:barb
See if this works. Look for <!-- missing ending --> on some </ul>'s. Can't
check IE6 without the html changes.
...
<!-- VISITOR VIEW/LOGOUT -->
<!-- <li><a href="/?preview=1">visitor view</a></li> -->
</li><li><a href="http://www.smugmug.com/logout.mg?goTo=http%3A%2F%2Fwfc.smugmug.com%2F">logout</a></li>
</ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--> <!-- missing ending -->
...
...
<li><a href="/keyword/tradhh" title="less traditional vessel forms"><span class="eng"> Less Traditional</span><span class="jpn"> Less Traditional</span><span class="ger"> Minder Traditionele</span><span class="fre"> Moins Traditionnel</span></a></li>
</ul><!--[if lte IE 6]></td></tr></table></a><![endif]--> <!-- missing ending -->
</li>
...
...
<li><a href="/gallery/4646214_3b3oa" title=""><span class="eng"> Comments or Suggestions</span><span class="jpn"> Comments or Suggestions</span><span class="ger"> Opmerkingen of Suggesties</span><span class="fre"> Commentaires et suggestions</span></a></li>
</ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
</ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--> <!-- missing ending -->
</div>
</center>
</div>
<!--[if lte IE 6]></td></tr></table></a><![endif]--> <!-- remove -->
<!-- End Drop Nav Bar-->
dac1117
Apr-24-2008, 11:06 AM
Thanks Allen - I went through again with my editor and hopefully caught all the missing endings. I have IE6 loaded on a remote PC but can't get to it at the moment. -dave c.
Allen
Apr-24-2008, 03:11 PM
Thanks Allen - I went through again with my editor and hopefully caught all the missing endings. I have IE6 loaded on a remote PC but can't get to it at the moment. -dave c.
Very confusing, you have class for menu and inside that a div for the admin
menu. At least it all shows in IE6 now but the CSS is not controling it, so
there's errors in the CSS somewhere.
dac1117
Apr-24-2008, 03:58 PM
Very confusing, you have class for menu and inside that a div for the admin
menu. At least it all shows in IE6 now but the CSS is not controling it, so
there's errors in the CSS somewhere.
the #adminMenu div is used only to display the admin menu (1st menu) when logged in. When I commented out the #adminDiv for testing, it did display the navBar (barely) but less useable than when the adminMenu div was left in.
I'm a bit confused, are the errors in the css section or the header (navBar) section? Anything else I should try?
Thanks for all your help. :D -dave c.
Allen
Apr-24-2008, 04:45 PM
the #adminMenu div is used only to display the admin menu (1st menu) when logged in. When I commented out the #adminDiv for testing, it did display the navBar (barely) but less useable than when the adminMenu div was left in.
I'm a bit confused, are the errors in the css section or the header (navBar) section? Anything else I should try?
Thanks for all your help. :D -dave c.
It looks like the CSS is not being applied for IE6.
Edit:
The admin menu shows up and works so the CSS does look like it's working, back to looking at html.
Edit2: See if putting a ul around the admin menu does anything for IE6
<!-- ADMIN -->
<div id="adminMenu">
<ul>
...
</ul> <!--[if lte IE 6]></td></tr></table></a><![endif]-->
</div>
<!-- END ADMIN -->
dac1117
Apr-24-2008, 06:24 PM
It looks like the CSS is not being applied for IE6.
Edit:
The admin menu shows up and works so the CSS does look like it's working, back to looking at html.
Edit2: See if putting a ul around the admin menu does anything for IE6
<!-- ADMIN -->
<div id="adminMenu">
<ul>
...
</ul> <!--[if lte IE 6]></td></tr></table></a><![endif]-->
</div>
<!-- END ADMIN -->
I Added Edit2 but it doesn't seem to have any effect :huh. Removing the #adminMenu div will display the menus, albeit jumbled and unusable.
Allen
Apr-24-2008, 06:51 PM
I Added Edit2 but it doesn't seem to have any effect :huh. Removing the #adminMenu div will display the menus, albeit jumbled and unusable.
Maybe IE don't like the div within a div. Change id to class.
<div id="adminMenu">
to this
<div class="adminMenu">
and in CSS these two
#adminMenu to .adminMenu
Just groping for an answer. The admin part works fine in IE but rest doesn't
pick up and use the CSS.
dac1117
Apr-24-2008, 07:12 PM
Maybe IE don't like the div within a div. Change id to class.
<div id="adminMenu">
to this
<div class="adminMenu">
and in CSS these two
#adminMenu to .adminMenu
Just groping for an answer. The admin part works fine in IE but rest doesn't
pick up and use the CSS.
still no change after changing id to class.
>> The admin part works fine in IE <<
Meaning that removing all the navBar code other than the <!-- ADMIN -->...<!-- END ADMIN --> section, will get it to display properly in IE6?
Allen
Apr-24-2008, 07:30 PM
still no change after changing id to class.
>> The admin part works fine in IE <<
Meaning that removing all the navBar code other than the <!-- ADMIN -->...<!-- END ADMIN --> section, will get it to display properly in IE6?
Another thing to try. Assign the class to the ul instead of div.
<!-- Drop Nav Bar NEW -->
<center>
<div class="menu">
<!-- ADMIN -->
<ul class="adminMenu">
...
...
<li><a href="http://www.smugmug.com/logout.mg?goTo=http%3A%2F%2Fwfc.smugmug.com%2F">logout</a></li>
</ul> <!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
</ul> <!--[if lte IE 6]></td></tr></table></a><![endif]-->
<!-- END ADMIN -->
<!-- HOME -->
<ul>
...
...
</ul> <!--[if lte IE 6]></td></tr></table></a><![endif]-->
</div>
</center>
<!-- End Drop Nav Bar-->
Change the #adminMenu to .adminMenu in your CSS.
.loggedIn .adminMenu {display: block;}
.adminMenu {display: none;}
dac1117
Apr-24-2008, 07:49 PM
Another thing to try. Assign the class to the ul instead of div.
<!-- Drop Nav Bar NEW -->
<center>
<div class="menu">
<!-- ADMIN -->
<ul class="adminMenu">
...
...
<li><a href="http://www.smugmug.com/logout.mg?goTo=http%3A%2F%2Fwfc.smugmug.com%2F">logout</a></li>
</ul> <!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
</ul> <!--[if lte IE 6]></td></tr></table></a><![endif]-->
<!-- END ADMIN -->
<!-- HOME -->
<ul>
...
...
</ul> <!--[if lte IE 6]></td></tr></table></a><![endif]-->
</div>
</center>
<!-- End Drop Nav Bar-->
Change the #adminMenu to .adminMenu in your CSS.
.loggedIn .adminMenu {display: block;}
.adminMenu {display: none;}
That seemed to do something. The 1st screenshot below is the result of the '<ul class="adminMenu">' change. The second screenshot is what displayed before when logged in using IE6
http://wfc.smugmug.com/photos/284694293_ErwFX-XL.jpg
http://wfc.smugmug.com/photos/284694304_9xPPi-L.jpg
dac1117
Apr-24-2008, 07:59 PM
Wondering if could have something to do with the <span class="eng"> tags in the non-adminMenu sections?
Allen
Apr-24-2008, 07:59 PM
That seemed to do something. The 1st screenshot below is the result of the '<ul class="adminMenu">' change. The second screenshot is what displayed before when logged in using IE6
Change this at the top
<center>
<div class="menu">
<ul>
<!-- ADMIN -->
<!-- <div id="adminMenu"> -->
<div class="adminMenu"> << remove
<ul> << remove
to this
<center>
<div class="menu">
<ul>
<!-- ADMIN -->
<!-- <div id="adminMenu"> -->
<ul class="adminMenu"> << add
Change this in the middle
...
</ul> <!--></td></tr></table></a><![endif]-->
</div> << remove
<!-- END ADMIN -->
<!-- HOME -->
<li><a class="drop" href="http://www.wood........
[I]
to this
...
</ul> <!--></td></tr></table></a><![endif]-->
<!-- END ADMIN -->
<!-- HOME -->
<ul> << add
<li><a class="drop" href="http://www.wood...
[I]change this at the end
</ul> <!--></td></tr></table></a><![endif]--> <!-- missing ending -->
</div>
</center>
</div> << remove
<!-- End Drop Nav Bar-->
[I]to this
</ul> <!--[if lte IE 6]></td></tr></table></a><![endif]-->
</div>
</center>
<!-- End Drop Nav Bar-->
dac1117
Apr-24-2008, 08:36 PM
Change this at the top
<center>
<div class="menu">
<ul>
<!-- ADMIN -->
<!-- <div id="adminMenu"> -->
<div class="adminMenu"> << remove
<ul> << remove
to this
<center>
<div class="menu">
<ul>
<!-- ADMIN -->
<!-- <div id="adminMenu"> -->
<ul class="adminMenu"> << add
Change this in the middle
...
</ul> <!--></td></tr></table></a><![endif]-->
</div> << remove
<!-- END ADMIN -->
<!-- HOME -->
<li><a class="drop" href="http://www.wood........
[I]
to this
...
</ul> <!--></td></tr></table></a><![endif]-->
<!-- END ADMIN -->
<!-- HOME -->
<ul> << add
<li><a class="drop" href="http://www.wood...
[I]change this at the end
</ul> <!--></td></tr></table></a><![endif]--> <!-- missing ending -->
</div>
</center>
</div> << remove
<!-- End Drop Nav Bar-->
[I]to this
</ul> <!--></td></tr></table></a><![endif]-->
</div>
</center>
<!-- End Drop Nav Bar-->
Pure genius! :clapThank you! So what was hanging IE6 up? Time for bed - you probably can use some sleep too.[I]
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.