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, ...Aligning and sizing divs with negative margins and emsAligning and sizing divs with negative margins and ems
Previous
 
Next
New Post
11/26/2008 2:50 PM
 

Hey everyone. Just trying to make my first skin here.

Here's my HTML:

    <div id="container">
        <div id="ControlPanel" runat="server" />
        <div id="header">
            <div class="logo float-left">
                [LOGO]
            </div>
            <div class="search float-left">
                [SEARCH]
            </div>
            <div class="menu clear">
                [MENU]
            </div>
            <div class="breadcrumb">
                [BREADCRUMB]
            </div>
        </div>
        <div id="TopPane" runat="server">
        </div>
        <div id="ContentPane" runat="server">
        </div>
        <div id="LeftPane" runat="server">
        </div>
        <div id="RightPane" runat="server">
        </div>
        <div id="BottomPane" runat="server">
        </div>
        <div id="footer">
            [COPYRIGHT]&nbsp;::&nbsp;[TERMS]&nbsp;::&nbsp;[PRIVACY]
        </div>
    </div>
 

And here's my CSS:

html
{
    height: 100%;
}
body {
    padding: 0px;
    margin: 0px;
    height: 100%;
    font-size: 62.5%;
    text-align: center;
}
#container {
    width: 100em;
    margin-right: auto;
    margin-left: auto;
    text-align: left;
}
#header
{
    width: 100em;
}
#footer
{
    width: 100em;
    text-align: center;
}
#TopPane{
    width: 100em;
}
#ContentPane{
    width: 56em;
    padding-right: 44em;
    float: left;
}
#LeftPane{
    width: 22em;
    margin-left: -44em;
    float: left;
}
#RightPane{
    width: 22em;
    margin-left: -22em;
    float: left;
}
#BottomPane{
    width: 100em;
    clear: both;
}

/* Skin Object Styles */

.logo
{
    width: 45em;
    margin-right: 55em;
}
.logo img
{
    width: 45em;
    height: 10em;
    border: 0;
}
.search
{
    width: 55em;
    height: 10em;
    margin-left: -55em;

}

 

.menu { width: 100em; }
.breadcrumb { width: 100em; }
/* Generic Styles */

.float-left { float: left; }
.clear { clear: both; }

 

My "logo" and "search" divs align side by side as expected using the padding and negative margins. Not so on my ContentPane, LeftPane and RightPane divs however. They all take all 100em (1000px in this case) of space within the "container" div.

Could anyone tip me off on how to get this to work for the Pane divs just as it does for the Logo and Search divs I have up there?

Thank you for any help.

 
New Post
11/27/2008 5:08 AM
 

Hi Sepher,

Are you trying to create a three column layout with the leftpane | contentpane | rightpane?

If so then the padding-right in the contentPane is 44em + width of 56em = 100em so therefore nothing else is going to be able to fit next to this pane as it totals the full width of the container.

Remove your paddings and margins from the contentPane, leftPane and rightPane and they should float next to each other. However because of your html they will probably be contentpane | leftpane | rightpane.

A good tool for checking css and html that I use is firebug which is an addon for firefox, well worth getting installed when looking at css/html issues.

I hope this helps,

OldBeno


 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Aligning and sizing divs with negative margins and emsAligning and sizing divs with negative margins and ems


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