Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7181619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:35:45+00:00 2026-05-28T17:35:45+00:00

I have a parent div #modal_share that contains a floating div modal_big_hline and a

  • 0

I have a parent div #modal_share that contains a floating div modal_big_hline and a unfloated div modal_big_button_container (with clear: both).

modal_big_button_container‘s CSS is created to allow it to be the width of the parent div minus 25px on its left and right sides.

Problem: Changing the margin-top of modal_big_button_container does not cause it to shift up/down, instead it remains in the same position, although its margin can be seen to be changing using Chrome’s developer tools.

Why is this happening, and how can I solve this? Thanks!

CSS

#modal_share {
    width: 565px;
    height: 400px;
    position: relative;
    background: whiteSmoke;
    padding-top: 10px;      
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    -webkit-box-shadow: 0px 3px 16px #222;
    -moz-box-shadow: 0px 3px 16px #222;
    box-shadow: 0px 3px 16px #222;
    display: none;  
}

.modal_big_hline {
    width: 100%;
    height: 1px;
    margin-top: 25px;
    border-top: 1px solid #CCC;
    float: left;
}

#modal_big_button_container {
    height: 14px;
    width: auto;
    margin: 10px 25px 0px 25px;
    clear: both;
}

HTML Structure

<div id="#modal_share">
    <div class="modal_big_hline"></div>
    <div id="modal_big_button_container"></div>
</div>

JSFiddle: http://jsfiddle.net/5LG2w/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:35:46+00:00Added an answer on May 28, 2026 at 5:35 pm

    try

    modal_big_button_container{
        position: relative;
          top: 20px;
    }
    

    here is the fiddle – http://jsfiddle.net/5LG2w/2/.

    or you can take the float out of .modal_big_hline. then your margin-top will work – http://jsfiddle.net/5LG2w/3/.

    #modal_big_button_container {
        height: 14px;
        width: auto;
        margin: 10px 25px 0px 25px;
        clear: both;
        background: red;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a parent div .photo_container that holds an img , and stretches to
If I have a parent div that is positioned absolutely and then a child
If you have a parent div that wraps a fixed height div and a
I have created a parent div and inserted div's after the parent div using
I have a main parent div that is .resizable(). One of it's child divs,
I have a collection of parent div s that are labeled with unique order
I have an unordered list that is a child in a smaller parent div
I have a function that prepends a li tag to a parent div just
I have a parent div #modal_share with a defined height of 400px . I
I have one parent DIV inside parent DIV i have two DIV one in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.