WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > WEB DESIGN > CSS > [SOLVED] margin-top bugging up div background.

Reply
  Thread Tools Display Modes
Old 13th February 13, 08:57 PM   #1
niixie
WLC Member
 
Join Date: Feb 2013
Posts: 1
Default margin-top bugging up div background.

Hey people!

I have a problem with my website. I have three divs, where one of them is in the other. When setting the margin in the div inside the other div, the margin moves away from the first div.

Code and picture proof, I do not know why it acts like this.

HTML Code:
<div id="header">
                <div class="pusher">
                    <div id="logo">
                    </div> <!-- logo end -->
                </div> <!-- pusher end -->
            </div> <!-- header end -->
            
            <div id="corps">
                <div class="pusher">
                    
                    <div class="post1">
                        test
                    </div> <!-- post end -->
                    
                </div> <!-- pusher end -->
            </div> <!-- corps end -->
Code:
#corps { background: #fff url('images/corpsbg.png') repeat; 
         min-height: 550px; 
         height: auto; 
         width: 100%; }

#corps .post1 { background: #eee; 
                min-height: 100px; 
                height: auto; 
                width: auto; 
                border: 1px solid #333; 
                margin-top: 20px; 
                -moz-border-radius: 10px;
                -webkit-border-radius: 10px;
                -khtml-border-radius: 10px;
                border-radius: 10px; }

( The gray is the first div. The cream/white background is the second, and the div inside is the one with dark gray border. )
niixie is offline   Reply With Quote
Old 15th February 13, 04:11 AM   #2
meesa
WLC Mod
 
meesa's Avatar
 
Join Date: Jul 2009
Location: Milky Way Galaxy
Posts: 3,716
Default Re: margin-top bugging up div background.

Has this really been solved?
__________________
Praise be to the Lord God for the ability to learn, the capability to analyze, and the time to help users on this forum.
meesa is offline   Reply With Quote
Reply


Thread Tools
Display Modes
Linear Mode Linear Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:48 AM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyrightę 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.