I want to know is it possible to display slideshow in a fixed col and images should not scroll with the text or other contents in col2 of the webpage.
You can use position:fixed to keep an element fixed in the viewport while other content scrolls but is generally only useful for small headers or footers or a small sidebar. The reason for this is that once a fixed element sticks out of the viewport it is unreachable as viewport scrollbars do not scroll a fixed element (because it is fixed).
Unless you say right whatever. Then it will move left with the window
And obscure the content when the text wraps
You can say left:0 right:0 but you would need to ensure that overflow:auto is also set for the fixed element but then starts to look a little messy. You can also top:xxpx and bottom xxpx but once again overflow would need to be set to auto.
Fixed elements are best at fixed widths and in small doses. I've been working with a fixed header for the last few months and its a real pain as its in a fluid site and when the text wraps it obscures the content so I've had to set a number of media queries to move the content away from the header at widths that its likely to wrap which of course doesn't help with text re-size. I've had to use a script to monitor the headers height and when it increases or decreases then I change the padding on the content underneath. Lastly when the header is too narrow for its content another media query switches it back to non fixed. All in all its a real pain although it looks nice.:)
Oh. I didn't look. Just made a general statement. The site I'm doing now is all fixed. Very tricky I'm finding.
This topic is now closed. New replies are no longer allowed.