I’m trying to implement media queries in the dotnetnuke framework.
Is there a way to conditional select what css to use? Im trying to stop IE6/7/8 which don’t have media query support to not access the media query CSS:
heres and extract from my code which doesn’t work:
<%@ Register TagPrefix="ddn" TagName="MENU" src="~/DesktopModules/DDRMenu/Menu.ascx" %>
<%@ Register TagPrefix="ddn" TagName="MOBMENU" src="~/DesktopModules/DDRMenu/Menu.ascx" %>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %>
<![if !(IE 6)|(IE 7)|(IE 8)]>
<dnn:DnnCssInclude runat="server" FilePath="mq.css" PathNameAlias="SkinPath" />
<![endif]>
<div id="wrapper">
<div id="header">
<div id="logo">
<dnn:LOGO runat="server" id="dnnLOGO" />
</div>
You can use this skin object to realize conditional loading of CSS:
40fingers style helper skin object