CSS Remove Overflow-y. Nowrap. Store Inline Items

What is wrong with that? Ive read a couple of posts that suggest that in order for all elements of the inline block to be on the same line with only overflow-x, the parent only needs the following CSS:

div { overflow-x:scroll; overflow-y:hidden; white-space:nowrap; } 

This is my CSS, right from my firebug for both the parent and the elements I need on the same line. Elements are wrapped only in vertical overflow. I am embarrassed. Any suggestions?

 .elementsRequiredOnSameLine { background: none repeat scroll 0 0 white; display: inline-block; float: left; height: 10em; text-align: center; width: 6em; } .parent{ display: inline-block; margin: 10px auto; min-height: 12em; overflow-x: scroll; padding: 10px; white-space: nowrap; width: 95%; } 
+4
source share
2 answers

Using float: left for elements will ignore the nowrap rule. Since you are already using display: inline-block , you do not need to float elements so that they appear side by side. Just remove float: left

+5
source

It was due to float: left ;, as soon as I deleted it, great. We marked this by typing a question sorry.

0
source

All Articles