Forums

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

Home Forums CSS align these divs in single line without breaking

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #44550
    Anonymous
    Inactive

    How can i align these divs one after the other without them breaking one ontop of the other and without using position:?http://codepen.io/Jarolin/pen/dcGxv

    #134074
    Paulie_D
    Member

    Depends on what you are trying to do.

    Why is floating &/or position a problem?

    #134075
    Merri
    Participant

    HTML:

    CSS:

    .slide-container {
    white-space: nowrap;
    }

    .slide {
    width:1000px;
    height:100px;
    background-color:red;
    margin:10px;
    display: inline-block;
    }

    And there you have it.

    #134076
    Anonymous
    Inactive

    @Merri that didn’t work. I updated the pen with your styles and there was no change.


    @Paulie_D
    you can add position:relative but don’t want actual positioning with numbers.

    #134079
    Merri
    Participant

    @Jarolin Did you notice the changes in HTML?

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