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 creating a three pane layoutHelp creating a three pane layout
Previous
 
Next
New Post
7/16/2008 8:14 AM
 

I'm trying to follow a skin tutorial and have run into a bit of a stumbling block that I can't seem to resolve.  I can't get my right pane to align with the right margin of my content container and think I've tried everything to get it right.  I'm hoping a fresh pair of eyes (and those with better skinning skills can help me out.    Here's the piece of my skin.css that I'm struggling with:

#content
{
padding: 0em;
width: 1064px;
}  
#menucontainer
{
    height: 600px;
    width: 225px;
    background-color: #231f20;
    font-size: 15px;
    font-family: Garamond;
    text-align: center;
    font-weight: bold;
    float: left;
    padding: 0;
    margin: 0;
}  
#primarycontainer
{
margin-left: 18.0em;
width:614px;
}
#secondarycontainer
{
   width:225px;
    background-color: #d6b956;
    height: 600px;
    float: right;
    margin: 0; 
}

And the code in my index.ascx file:

<div id="content">
<div id="menucontainer">
    <div id="LeftPane" runat="server" visible="false"></div>
</div>
<div id="primarycontainer">
                <div id="ContentPane" runat="server" visible="false"></div>
               
</div>
<div id="secondarycontainer">
            <div id="RightPane" runat="server" visible="false"></div>
</div>

In IE, the secondarycontainer aligns on the right margin of the container, but doesn't sit at the top.  In Firefox, it sits at the top but is about 20px off the right margin. 

 

 
New Post
7/16/2008 10:27 AM
 

Try using percentages instead of fixed widths.

Jeff

 
New Post
7/18/2008 2:01 PM
 

As you have noticed IE and Firefox don't behave the same when it comes to margins/padding and widths.

The are a number important things to note here;

Firstly, Use a doctype declaration for your skin... this is critical. Without it the browser will adopt 'quirks mode' for default css settings for tags making for all sorts of apparently random behaviour between browsers.

Secondly, when you are using floated columns avoid using pixel measurements if you want consistant behaviour between browsers.
Most importantly (and often forgotten) include the left and right margin and padding settings in your calculations of column widths so it totals 100%. This does work, in practice for completely consistant output in all browsers.

Thirdly, use the clear directive after floating columns.... 

Tip;
.clearboth {
clear:both;
}

like this;
<div class="col1" >bla bla</div>
<div class="col2">bla bla</div> 
<br class="clearboth" />
<div class="col1" >bla bla</div>
<div class="col2">bla bla</div> 
<div class="col3">bla bla</div> 
<br class="clearboth" />

the use of <br/> is not absolutely essential but improves compatability in older browsers.

Fourthly, watch out for the dreaded IE overflow bug.... this has a nasty habit of breaking columns when content wants to grow beyond the size of the column... set overflow:hidden; to stop this for IE.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Help creating a three pane layoutHelp creating a three pane layout


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