XHTML Transition DOCTYPE - Alignment Problem
Last Post 08/23/2007 3:41 PM by Lee Sykes. 5 Replies.
Author Messages
Adam
Nuker
Nuker
Posts:16


--
08/09/2007 3:43 PM  
Hi All,

I am having problems with the alignment of some of the content in my containers. I believe it has something to do with the DOCTYPE. I have changed my DNN skin to use the XHTML 1.0 Transitional DOCTYPE and some content appears centred. If I revert to HTML 4.0 Transitional, the content appears on the left.

I have taken some screenshots of the results in both modes. Here is the "register" page in XHTML mode:

http://www.sinconta.com/sites/churchyard/xhtml.jpg

Here is the "register" page in HTML mode:

http://www.sinconta.com/sites/churchyard/html.jpg

My CSS container is as follows:

<div class="containertitle clearfix">
   
<div><dnn:DROPDOWNACTIONS ID="dnnACTIONS" runat="server" />div>
   
<div class="titletext"><dnn:TITLE ID="dnnTITLE" runat="server" />div>
div>
<
div id="contentpane" runat="server" class="containercontent">div>
<
div><dnn:ACTIONBUTTON1 runat="server" id="dnnACTIONBUTTON1" CommandName="AddContent.Action" DisplayIcon="True" DisplayLink="True" />div>

When the container is rendered to the browser, the contentpane div ends up like this:



You will notice that DNN has added the align="left" attribute to it.

I am guessing the problem lies with the fact that this attribute is being applied to all child elements when the browser is in XHTML Transitional mode.

Has anybody else experienced this problem? Are there any known workarounds?

Thanks!
Adam

David
Nuke Master
Nuke Master
Posts:152


--
08/09/2007 5:13 PM  
I have had a similar problem with my xhtml skin. It really showed up on the login screen. On my primary portal www.AgingSafely.com is was centered and with the same skin on a parent portal it was left justified.


I am assuming that it was a css or html problem in the skin. It did do better with the default DNN skin.

I finally went back to HTML 4.0 and both looked better.
Adam
Nuker
Nuker
Posts:16


--
08/10/2007 12:05 PM  
Has anybody else had any bad experiences when changing the DOCTYPE in their skins? Do you suggest that I go back to using HTML 4.0 Transitional?

Thanks,
Adam
David
Nuke Master
Nuke Master
Posts:152


--
08/10/2007 2:47 PM  
I just did it because it was quick and easy, not because it was the right thing or what I recommend. Infact, I assume that I have a problem in the skin or container.

I am hoping that one of Lee's new xhtml skins will show if this is my problem or DNN's. If it has the problem then I can assume that the problem isn't mine. (I hope)

The first thing that I would do is to drop the skin and container files into Visual Web Developer Express and check that all of the
s match correctly. I have had several problem where I was missing a
and IE and FireFox almost did the right thing.

/DaveS

/DaveS
Adam
Nuker
Nuker
Posts:16


--
08/23/2007 11:03 AM  
Lee, we all know that using web standards is the way forward. When you use Web Standards and XHTML to create your skins, do you leave the DOCTYPE set to HTML 4.01 Transitional for DNN compatibility purposes?
Lee Sykes
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945


--
08/23/2007 3:41 PM  
I use XHTML Transitional on all my CSS skins. This ensures a consistant display between all browsers. Further info here:
Browser Quirks, Standard Compliance modes and Doc Types

How to create resizable text

How to select DOC TYPES in DotNetNuke 4.4

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/DNNCreative

Lee Sykes's Facebook Profile


---