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, ...Help with CSS and SkinningHelp with CSS and Skinning
Previous
 
Next
New Post
12/9/2008 10:59 AM
 

I am going crazy on this, I have a basic html skin that I designed in VS2008. I view it in IE and it looks the way I want it, content is aligned to the center in IE. When I upload it and apply skin to DNN the content is aligned to the left. I try everything to aligned to the center but nothing is working. Can some one send me a working basic skin that the content aligns to the center so I can how it works. I am including code from HTML and CSS files;

HTML

 <body>
 <div id="mainform">
 
  <div id="logoPad">
   [LOGO]
  </div>
  <div id="header">
   [SEARCH]
   [LOGIN]
   [USER]
  </div>
  <div id="menu">
   [NAV]
  </div>
  <div id="content">
   <div id="ContentPane" runat="server">
   </div>
   
  </div>
 
 </div>
</body>
 

 

CSS

body {background:#FFF url(images/body_bg1.png) repeat-x top left; height:100%; margin:0px; padding:0px; }

#mainform
{
 background-color:white; width:920px; margin:auto; padding:10px;
}

 
New Post
12/18/2008 4:19 PM
 

Try adding text-align:center to your body style.

Then add text align:left to you #mainform style.  If that doesnt work try wrapping your mainform div with a center tag.  Depending on what doctype you are using this may or may not validate but it should definitely center your stuff. 

Good Luck

 

 
New Post
12/18/2008 4:47 PM
 

You have to have the right doctype.

By default DNN use <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

I think your skin is designed to follow !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

Look in the standard skin in rel 4.9 or 5.0 how you change the default doctype.

Jan

 
New Post
12/18/2008 6:15 PM
 

It's the doctype margin auto does not work in IE for cetnering if the doctype is not XHTML

 
New Post
12/31/2008 7:48 AM
 

just open your ascx skin and add this above the html code

 

<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
   Dim skinDocType as Control = Me.Page.FindControl("skinDocType")
   If Not skinDocType is Nothing
      CType(skinDocType, System.Web.UI.WebControls.Literal).Text="<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">"
   End If
End Sub
</script>

 

You can also inlcude a doctype.xml but i dont liek that because each skin needs to have its own xml doctype  but you can choose otherwhise

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Help with CSS and SkinningHelp with CSS and Skinning


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