Pages: [1]   Go Down
Send this topic | Print
Author Topic: Position: fixed.....vertical only?  (Read 521 times)
mindpetrol
Member
*
Offline Offline

Posts: 39


WWW
« on: November 26, 2008, 04:03:38 AM »

Could you fix an element so that it still moves with the rest of the page left to right, but it stays in the same place in your browser window when you scroll up and down?  Sorry if this is a bit of a poor explanation.
« Last Edit: November 27, 2008, 03:32:07 AM by mindpetrol » Logged
avalon-nation-ms
Hyper-Active Member
***
Offline Offline

Posts: 105


WWW
« Reply #1 on: November 26, 2008, 04:09:38 AM »

Code:
background-attachment: fixed

That should do it., put it in your css where the background image is held.

if you want to test it,
go here,

http://twewy-fan.com/forum

and minimize the window to very small, scroll left and right and you will see.
Logged
mindpetrol
Member
*
Offline Offline

Posts: 39


WWW
« Reply #2 on: November 27, 2008, 03:15:24 AM »

That would work if I wanted it to be fixed both vertically and horizontally, but I still want the user to be able to scroll to the right of the page and have the element disappear off screen.  I only want it to remain unaffected by scrolling when the user scrolls up/down.  Do you see what I mean?
Logged
inp o҉rtb
The Gangsta
Global Moderator
Official 110mb Guru
*****
Offline Offline

Posts: 15644


experimental theologian


WWW
« Reply #3 on: November 27, 2008, 05:11:49 AM »

Yeah we know what you mean, and it can't be done with pure CSS.
Logged

Hi! I’m a signature virus! Add me to your signature to help me spread.
spam me: ispamspot@gmail.com

blog | my work @ deviantART | Imagine-ng image editor
Pages: [1]   Go Up
Send this topic | Print
Jump to: