Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Floating problem

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #39943
    matt_sanford
    Participant

    I am having a problem floating a picture inside an element. everytime i float it, it drops down to the next div, where it isn’t suppose to be. Here is the link to the site. http://www.foursquaresummiteast.org/i/
    The problem is found underneath the navigation bar. Id is #featuring

    cheers,

    #110502
    djrolstad
    Participant

    are you trying to have the pictures side by side if so make
    .right {
    float: left;
    }
    I don’t know what your trying to accomplish…

    #110505
    matt_sanford
    Participant

    There is only suppose to be one picture per div. The img that is floated to the left is suppose to be in the div above it. not below.

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.


    Special Guest Speaker:

    Cornell Jordan


    Css:

    .pic {
    height: 100px;
    width: 100px;
    margin: 5px;
    display: inline-block;
    margin: 25px 10px 15px 15px;
    border: 1px solid black;
    }

    .left {
    float: left
    }

    .right {
    float: right;
    }

    #110506
    matt_sanford
    Participant

    for some reason i can’t show my html….

    #110507
    djrolstad
    Participant

    ohhh I see, I’ll take a look

    #110509
    djrolstad
    Participant

    that’s weird… quickly took a look and can’t seem to see what the problem is.. put your html and css into codepen.io.. maybe someone else can figure this out

    #110510
    Senff
    Participant

    Here’s the thing…. The UL with id “checkout” is floated left. But then the element after that, sidebar-left, CLEARS the left float. So (simple way of saying it), the rest of the page will start on that height, and no other block elements will be floated next to the checkout UL.

    It’s not working EXACTLY like that, which is why the paragraph and “featuring” div are on top again, but the image doesn’t ignore that clearing and that’s why it’s at that height, right under the checkout UL.

    I would suggest to move that UL within the sidebar-left div.

    #110494
    matt_sanford
    Participant

    @Senff Thanks! it works now.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.