In an attempt to use a different stylesheet for IE7, I implemented the following code in my custom skins code-behind file. There are some minor style issues with my site in IE that I'd like to fix. I read a similiar thread by a previous poster --- > http://local.dotnetnuke.com/Community/Forums/tabid/795/forumid/109/threadid/209121/scope/posts/Default.aspx
I implemented the code that was documented here, but I still can't get my css file to show up for the IE7 browser.
Sub Page_Load
Dim cssFixFile As String
If (Request.Browser.Browser.Equals("IE")) Then
If (Request.Browser.MajorVersion > 6) Then
cssFixFile = Path.Combine("Me.SkinPath.ToString()", "skin_IE7.css")
End If
If cssFixFile <> "None" Then
Dim link As System.Web.UI.HtmlControls.HtmlGenericControl = New System.Web.UI.HtmlControls.HtmlGenericControl("LINK")
link.Attributes.Add("rel","stylesheet")
link.Attributes.Add("type","text/css")
link.Attributes.Add("href", cssFixFile)
Page.Header.Controls.Add(link)
End If
End If
End Sub
Any Suggestions as to why it isn't working?