Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

PortalWebHosting
  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

Salaro -- Skins and more
OnyakTech
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
SteadyRain
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Question about style sheets
Previous Previous
 
Next Next
New Post 8/1/2008 7:45 PM
Resolved
User is offline nickfox
63 posts
10th Ranked


Question about style sheets 

I am moving a large .net application to DotNetNuke. Currently I have 2 style sheets. One is for firefox/IE6 and the second is for IE7. On aspx pages, I use:

<link href="styles.css"           rel="stylesheet" type="text/css" />
<!--[if gte IE 7]>  
<link href="stylesIE7.css"     rel="stylesheet" type="text/css" />
<![endif]-->

to differentiate between the two.

Within the firefox/IE6 style sheet, I use this:

html>body .helpticketselect {  vs.  .helpticketselect {

to differentiate between firefox and IE6.

So here is my question. I know that I should *not* link to stylesheets from within a control (ascx) and I want to put all my style information into module.css, I can just cut/paste the firefox/IE6 code but how do I integrate the IE7 style sheet?

thanks

Nick

 

 

 

 
New Post 8/2/2008 8:53 AM
Accepted Answer 
User is offline Andrew Ross
45 posts
10th Ranked


Re: Question about style sheets 

Hi Nick,

I found this very simple js script that i put in all my skins that help me with the different browser issues.  This is not my script, and i don't remember where i found it, but it works great.

<script type="text/javascript">
var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}();
/*
Examples:

html.gecko div#header { margin: 1em; }
.opera #header { margin: 1.2em; }
.ie .mylink { font-weight: bold; }
.mac.ie .mylink { font-weight: bold; }
.[os].[browser] .mylink { font-weight: bold; } -> without space between .[os] and .[browser]
Available OS Codes [os]:
win - Microsoft Windows
linux - Linux (x11 and linux)
mac - Mac OS
Available Browser Codes [browser]:
ie - Internet Explorer (All versions)
ie8 - Internet Explorer 8.x
ie7 - Internet Explorer 7.x
ie6 - Internet Explorer 6.x
ie5 - Internet Explorer 5.x
gecko - Mozilla, Firefox (all versions), Camino
ff2 - Firefox 2
ff3 - Firefox 3
opera - Opera (All versions)
opera8 - Opera 8.x
opera9 - Opera 9.x
konqueror - Konqueror
webkit or safari - Safari, NetNewsWire, OmniWeb, Shiira */
</script>


JL Systems
(DNN Site Examples)
American Holistic Nurses Association
Greater Reston Chamber of Commerce
Financial Planning Institue of Southern Africa
 
New Post 8/2/2008 10:21 PM
User is offline nickfox
63 posts
10th Ranked


Re: Question about style sheets 

Thanks Andrew, that is really excellent. I did find the original website:

http://rafael.adm.br/css_browser_selector/

Nick

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Question about style sheets
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNNhost Scandinavia
SUPER fast QuadCore DELL servers, MSSQL servers, DotNetPanel, daily backup, Check out our customers websites
DNNhost.dk
Personify Design, Inc.
Seattle-based Personify Design has developed customized DotNetNuke websites for a wide range of customers to meet many different types of needs, including distributed authorship across thousands of pages to integrated Verisign e-commerce capabilities.
www.personifydesign.com
DNN Outsourcing
50% more affordable services comparing to Western Europe and US: Custom DotNetNuke module development, skins, consulting, maintainence... Over 15.000 working hours of experience in custom DotNetNuke Solutions development, 8 years experience in outsourcing, excellent references!
www.dnnoutsourcing.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP