Why is this one div container blocking the other from floating right?

Posted by user2824289 on Stack Overflow See other posts from Stack Overflow or by user2824289
Published on 2013-11-10T03:42:04Z Indexed on 2013/11/10 3:53 UTC
Read the original article Hit count: 138

Filed under:
|
|

I know the answer is very simple, it's probably one little CSS property, but I've tried to find the solution without asking it here, no luck..

There are two div containers within a div container, and they aren't playing nice.

The one is positioned to float right in the upper righthand corner of the parent div, and it won't let any other container float to the right of it.

I tried display:inline and display:inline-block but no luck...

Here's the code, though something tells me the answer is so easy you won't need it!:

The parent div, the upper righthand corner div, and the poor div trying to float right:

    #um-home-section4   {
    width:100%;
    height:300px;
    background-color: green;
}

#um-title-right {
    float:right;
    width:500px;
    height:50px;
    margin-right:20px;
    margin-top:20px;
    background-color: fuchsia;
}

#take-me-there  {
    float:right;
    margin-top:240px;
    margin-right:0px;
    height:50px;
    width:100px;
    background-color: gray;
}




<div id="um-home-section4">
                <div id="um-title-right"></div>
                <div id="take-me-there"></div>

            </div>

© Stack Overflow or respective owner

Related posts about css

Related posts about div