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, ...Pure CSS problems Centre PagePure CSS problems Centre Page
Previous
 
Next
New Post
1/9/2008 4:36 AM
 

Hello,
          This is my first post and I have just started to use DNN to develop an ecommerce system.
I have paid a DNN skinning company to skin a css, xhtml template for me that I obtained on oswd, and what I got back was a load of tables, and not very true to the template!

Anyway to cut a long story short I have examined their template written in tables, the xml files, and the css. I have now started to convert the template my self and was ultimatley succesful! Except centering the main page div on the page.

I have read quite a few different methods but none seems to work with my site. I am testing this in IE 7.

 

this is the css that makes up the page container, :

/* NON-HEADER */

 body {margin:0px auto; font-size:62.5%; background-color:rgb(255,255,255); font-family:verdana,arial,sans-serif;} /*Font-size: 1.0em = 10px when browser default size is 16px*/
.page-container { width:900px; margin-top:10px; margin-bottom:10px; border:solid 1px rgb(150,150,150); font-size:1.0em;}
.main {clear:both; width:900px; padding-bottom:30px; background:transparent url(./images/bg_main_withnav.jpg) top left repeat-y;}
.main-navigation {display:inline /*Fix IE floating margin bug*/; float:left; width:200px; overflow:visible !important /*Firefox*/; overflow:hidden /*IE6*/;}
.main-content {display:inline; /*Fix IE floating margin bug*/ float:left; width:440px; margin:0 0 0 30px; overflow:visible !important /*Firefox*/; overflow:hidden /*IE6*/;}
.main-subcontent {display:inline /*Fix IE floating margin bug*/; float:right; width:185px; margin:0 15px 0 0; overflow:visible !important /*Firefox*/; overflow:hidden /*IE6*/;}
.footercont {clear:both; width:900px; padding:1.0em 0 1.0em 0; background:rgb(225,225,225) url(./images/bg_foot.jpg) no-repeat; font-size:1.0em; overflow:visible !important /*Firefox*/; overflow:hidden /*IE6*/;}

 

/* HEADER */
.header {width:900px; font-family:"trebuchet ms",arial,sans-serif;}
.header-middle {width:900px; height:150px; background:rgb(230,230,230) url(./images/Farmers.gif); overflow:visible !important /*Firefox*/; overflow:hidden /*IE6*/;}
.header-bottom {width:900px; height:40px; background:rgb(255,255,255) url(./images/bg_head_breadcrumbs.jpg) repeat-y;}
.header-breadcrumbs {clear:both; width:900px; padding:1.0em 0 1.5em 0; background:rgb(255,255,255) url(./images/bg_head_breadcrumbs.jpg) repeat-y;}

Here is my markup

<link rel="stylesheet" type="text/css"  href="layout4.css" />

  <div class="page-container" >
    <div class="header">
      <div class="header-middle">   
      </div>
      <div class="header-bottom">
        <div class="nav2">
     [SOLPARTMENU]
        </div>
   </div>
      <div class="header-breadcrumbs">
        [BREADCRUMB]   
        <div class="searchform">
            [SEARCH]
        </div>
      </div>
    </div>
    <div class="main">
      <div class="main-navigation">
        <div class="round-border-topright"></div>
        <div class="first"><div id="toppane" runat="server"></div></div>
       <div id="leftpane" runat="server"></div>                     
      </div>
      <div class="main-content" id="ContentPane" runat="server">
      </div>
      <div class="main-subcontent" id="RightPane" runat="server">
      </div>       
    </div>
    <div class="footercont">
      <p>[COPYRIGHT] | All Rights Reserved</p>
      <p class="credits">[PRIVACY] | [TERMS] | [USER] | [LOGIN]</p>
    </div>     
  </div>

Sorry if i am missing anything but as soon as i removed the stabdard html markup it all hun to the left, i have tried position:absolout, and setting the body width but neither seemed to make a difference.

 

 
New Post
1/9/2008 5:19 AM
 

Hello,

A typical method used is:
#wrap {
background:#fff;
color:#404040;
margin:0 auto;
width:760px;
}

With the left and right margins set to auto it automatically centers the skin - so you could try this in your page-container class


Lee Sykes - DNN Creative Magazine - 600+ Video Tutorials, Articles, Interviews - July Issue 58 out now!
DNN Creative Magazine for DotNetNuke

Twitter: www.twitter.com/DNNCreative

Lee Sykes's Facebook Profile
 
New Post
1/9/2008 12:05 PM
 

i have tried that and it still sits to the left

 body {font-size:62.5%; background-color:rgb(255,255,255); font-family:verdana,arial,sans-serif;} /*Font-size: 1.0em = 10px when browser default size is 16px*/
.page-container {margin:0px auto; width:900px; margin-top:10px; margin-bottom:10px; border:solid 1px rgb(150,150,150); font-size:1.0em;}

above was the css that was used to to try this. I have even tried this with the body css commented out.

it works until <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> is removed in the preview in VS2005 so DNN is set to doctype html as standard? how can i change it to xhtml? I think this is why my skin is not working?

Should i be specifying this in nuke?

 
New Post
1/9/2008 3:47 PM
 

two things:

 

1. you don't need to specify units when your value is 0. So 0px can just be 0

2. use the doctype.xml resource blogged about here: http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryID/1226/Default.aspx

 

and yes you are right. changing the doctype will change how effective your CSS is in all browsers.

 
New Post
1/9/2008 6:16 PM
 

i will give my css a good clean when I have time. The doctype was the problem, i resolved by adding the doctype xml document to the package.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Pure CSS problems Centre PagePure CSS problems Centre Page


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