tonelm54
asked on
Float to overflow
Im trying to make a kinda Excel like sheets tab at the bottom of one of my pages, however I cant get the tabs to flow on one line to allow overflow to work correctly, instead it seems to wrap the divs onto the next line:-
Ive put my code on a jsFiddle to show you what I have got soo far
https://jsfiddle.net/gLu58tdw/
Any ideas how I can flow my tabs across instead of it wrapping?
Thanks in advance
Ive put my code on a jsFiddle to show you what I have got soo far
https://jsfiddle.net/gLu58tdw/
Any ideas how I can flow my tabs across instead of it wrapping?
Thanks in advance
Hey there,
You should try with a display: inline-block instead of float. Add in a nowrap to the whitespace and you'll be heading in the right direction:
Stanyon/14 zkfd85/
You should try with a display: inline-block instead of float. Add in a nowrap to the whitespace and you'll be heading in the right direction:
#divTabs {
height: 45px;
overflow-x: scroll;
overflow-y: hidden;
white-space: nowrap;
}
.divTab {
display: inline-block;
padding-left: 5px;
padding-right: 5px;
border-left: 1px solid grey;
}
Here's a working demo - https://jsfiddle.net/ChrisThis question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
ASKER