IE6 Float Bug

Lots of people like CSS and it certainly has it’s place. But when the most popular browser has a bug that prevents a simple div element from displaying properly we all get frustrated. All I wanted to do was have a box “float” to the right side of the page. It works great in IE7 and Firefox. IE6 displayed the box in the content area instead of to the right. See this page for more details. But the simple answer is add “display: inline” to the style. As I understand this, we are using a bug in IE6 to correct another bug in IE6. Okay, I grant you, this is confusing.

To fix the IE6 “float” bug to this:

<div class=”box”>
   <div class=”sidebar” style=”float: right; display: inline“>content
   </div>
   content
</div>

Source: http://www.positioniseverything.net/explorer/floatIndent.html

Force SSL ON or OFF Function

When working on a site that may have some pages in SSL (the check out pages) and most pages not I use a function to switch between SSL and Non SSL pages.

First, I set the non secure and SSL URL’s in the config file under appSettings:

    <add key=”SSLURL” value=”https://www.mydomain.com”/>
    <add key=”NonSSLURL” value=”http://www.mydomain.com”/>

Next, in my utility class I add this function:

    Public Function PageStartUp()
        If Request.ServerVariables(“HTTPS”).ToLower = “on” And Not gIsSSLRequired Then
            If Request.QueryString.ToString.Length > 0 Then
                Response.Redirect(ConfigurationManager.AppSettings(“NonSSLURL”) & Request.ServerVariables(“SCRIPT_NAME”) & “?” & Request.QueryString.ToString)
            Else
                Response.Redirect(ConfigurationManager.AppSettings(“NonSSLURL”) & Request.ServerVariables(“SCRIPT_NAME”))
            End If
        End If
        If Request.ServerVariables(“HTTPS”).ToLower = “off” And gIsSSLRequired And ConfigurationManager.AppSettings(“SSLURL”).ToLower.Substring(0,5)=”https” Then
            If Request.QueryString.ToString.Length > 0 Then
                Response.Redirect(ConfigurationManager.AppSettings(“SSLURL”) & Request.ServerVariables(“SCRIPT_NAME”) & “?” & Request.QueryString.ToString)
            Else
                Response.Redirect(ConfigurationManager.AppSettings(“SSLURL”) & Request.ServerVariables(“SCRIPT_NAME”))
            End If
        End If
        Return True
    End Function

Be sure to add the public variable gIsSSLRequired in the class as well.

Then in the page load event of each page I add the following:

gIsSSLRequired = True
Call PageStartUp()

Cool, huh?

Ways to Still Use IE6

Some users of IE7 have difficulty logging in to various portal websites with IE7. Here are a couple of options to continue to use IE6.

1. Here is a link that installs an IE6 emulator. It functions for exactly one session and then reverts to IE7.

http://go.microsoft.com/fwlink/?LinkID=70356

It was found it on nVidia’a partner website. They say:

“Currently, NVIDIA is working to ensure all its applications are compatible with the new version. In the meantime to login to the portal you will require Internet Explorer 6 (IE 6). NOTE: This does not mean you need to revert to IE 6, Microsoft has provided a utility that will allow you to access NVIDIA’s portal while continuing to use IE 7. This utility emulates IE 6 for your current browser session only. To quickly return to the portal after the utility is installed, we recommend you save the portal link as a Favorite in your browser. “

Using the Utility
Once the utility has been installed, go to Start > All Programs and select the “User Agent String Utility”. The dialog box below will appear. Select “Just change my settings” and then press the “Change Settings” button.

Thanks to Wynn Smith.

2. Upgrade local IE6 to IE7 but still run IE6 in Virtual PC 2004 for free:

Virtual PC 2004 SP1

http://www.microsoft.com/downloads/details.aspx?FamilyId=6D58729D-DFA8-40BF-AFAF-20BCB7F01CD1&displaylang=en

Internet Explorer 6 Application Compatibility VPC Image http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en

Thanks to Charles Bernard.

DISCLAIMER: I have not tried either of these methods.

IE7 Tabbed Browsing

Another comment about IE7 – I use SHIFT when clicking a hyper link to open a new window a lot. At times I get up to 20 open windows. To open a new TABBED window I now hold down the CTRL key when clicking a hyper link. The CTRL-TAB keys work like ALT-TAB to cycle through the tabbed windows just like many other Windows programs. So far IE7 has worked well for me. How is it working for you?

FTP Not supported in IE7

I’ve been using IE7 for a couple of days now. I just ran into a feature I used in IE6 that isn’t in IE7. In IE6 I’ve created hyperlinks that will open up an FTP site and automatically log me in. The current version of IE7 does not support FTP. That’s one way to be more secure – remove the feature altogether! What I get now is a page that says “To view this FTP site in Windows Explorer, click Page, and then click Open FTP Site in Windows Explorer.” At least the “Page” button has a “Open FTP Site in Windows Explorer” option. It is a bit annoying though.