CSS fixed shit help
- Started
- Last post
- 9 Responses
- ESKEMA
So I have this question, I want a div fixed at the bottom but that will scroll horizontally but not vertically.
the site is wide (3500px wide) and will have some vertical scroll too.
I want a div attached to the bottom, that will stay there but it needs to move according to the horizontal scroll.Is this possible?
tried a bunch of scenarios but with no luck.
- ideaist0
ESKEMA
You need a <div> within another <div>.
The outer div is width: 100%; and the inner div is the actual width of the content within it (you said 3500px, I believe).
Now, all you have to do is set the overflow-x: auto & overflow-y: hidden.
- Oh, & set the outer <div> as position: fixed; as well as bottom: 0px;ideaist
- ESKEMA0
sorry, maybe I'm being a bit confusing.
Your solution makes the div scroll independently of the rest of the page... that's not what I need.What I need is like having an div with absolute positioning bottom 0, left 0. but that will stay at the bottom when I scroll vertically.
It should scroll horizontally with the rest of the site, not independently.
- ESKEMA0
http://eskema.org/test/fixed.htm…
something like this, but the bottom div should stay at the bottom when scrolling vertically.
- orrinward0
position:fixed not position:absolute.
absolute positions itself based on the page as a whole/nearest-declared-relative... It's like pinning something to the board. fixed is like pinning something to the screen.
- estetic0
http://www.esteticdesign.com/hor…
set width for body element, position a wrapper with 'overflow=scroll', then position the footer with a set width
- orrinward0
If you want it to stay fixed at the bottom for vert-scrolling, but move left-right with left/right movement, then you'll need Javascript.
- ESKEMA0
http://eskema.org/test/fixed2.ht…
or like this but scrolling like the top one...
- estetic0
unless i am missing something I think my solution fits the bill - if you can't set a width (dynamic content ect) you will need to use JQuery to get the doc width
- http://www.esteticde…estetic
- I thought yours does as well.orrinward
- ESKEMA0
@ estetic
This works. still have the annoying scroll at the bottom but I'll work around it.Thanks!