Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...The box model problem in DotNetNukeThe box model problem in DotNetNuke
Previous
 
Next
New Post
5/17/2010 9:05 PM
 
Guys,

Just want a dotnetnuke site to work in both firefox and IE8 without resorting to old fashion tables.

Doesn't anyone have issues with the box model anymore?
Saw a post about changing the top line, but dotnetnuke overrides it....

Isn't the best design to design for Firefox and add a css file for IE (even version 8)?
How do you guys also cater for mobile phone browsers or am I missing something?

Simply need to change a skin so it uses another css for all IE browsers.

When one puts this in:
<link rel="stylesheet" type="text/css" href="skin.css" />
    <!--[if IE]>
    <link rel="stylesheet" type="text/css" href="skin_ie7.css"/>
      <![endif]-->
      <!--[if lt IE 7]>
    <link rel="stylesheet" type="text/css" href="skin_ie6.css"/>
      <![endif]-->
The condition if IE doesn't appear in DNN 5.4.1!
Sure this worked in 5.0.
Anyway...can edit the .ascx page ... but isn't it best to use the ancient method of editing the .html instead of the .ascx and reparse?
 (sorry - it's just that sitefinity uses master pages and dnn doesn't )
as shown below:
<dnn:STYLES runat="server" id="StylesIE6"  Name="IE6Minus" StyleSheet="css/ie6skin.css" Condition="LT IE 7" UseSkinPath="true" />
<dnn:STYLES runat="server" id="StylesIE7"  Name="IE7" StyleSheet="css/ie7skin.css" Condition="IE" UseSkinPath="true" />

 
New Post
5/18/2010 11:26 AM
 
DNN HTML is not different from regular HTML, apart for the fact that the Head from an HTML skin is stripped on skin parse.
Most issues are caused by the not using an XHTML doctype.

From my documentation:

---------------------------------------

Skin Doctype

If you create a skin, the skin parser (which converts an HTML skin file to the actual skin usercontrol) only uses the HTML pages content between the body tags.

Anything outside the body tags is ignored.

This means the doctype of an HTML skin is not used by DotNetNuke.

This could lead to rendering difference if you use an XHTML doctype in your HTML skin, since DotNetNuke use a HTML 4 transitional doctype by default (to support legacy skins).

There are 2 ways to force DotNetNuke to use an XHTML doctype:

A. You can set the doctype for a specific skin by including a doctype.xml file.

The name of this file should be: "skinname".doctype.xml.

So of every HTML / ASCX file you will have to add an XML file.

The content of this file should be:

<SkinDocType>

            <![CDATA[<!DOCTYPE>]]>

</SkinDocType>

The <!DOCTYPE> part should be replaced with the HTML doctype.

XHTML 1.0 Transitional

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

XHTML 1.0 Strict

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

B. You can set the Fallback doctype from the host settings.

Choose Host > Host Settings and select the doctype under “Fallback Skin doctype”.

This will force all skins on all portals without a doctype.xml file to use the doctype you set.

Please beware that this could potentially lead to unwanted effects if there are non XHTML skins in other portals then the one you are targeting.

Xml Namespace for XHTML skins

If you use an XHTML doctype, the Xml Namespace will be added automatically to the HTML element by the Framework. (Result: <html xmlns="http://www.w3.org/1999/xhtml" >)

Use an XHTML Doctype

It is best to use an XHTML doctype for your skins, there are several reasons for this.

1. Skinning is a lot easier with an XHTML doctype because Internet Explorer renders a page a lot better (according to the W3C standards) if you use XHTML.
This means the page looks a lot more similar in the different browsers from scratch, which means you have to spend less time on IE CSS hacks.

2. An XHTML doctype is a good start to make your pages more accessible to visually impaired people.

3. Validating your skin with an XHTML doctype will potentially improve your SEO and will lead to cleaner and better performing skins.

4. Non XHTML doctypes are legacy / history / old fashioned
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...The box model problem in DotNetNukeThe box model problem in DotNetNuke


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out