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
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
Depends on what you are trying to do.
Why is floating &/or position a problem?
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.
@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.
@Jarolin Did you notice the changes in HTML?