Fixed horizontal position element, vertical static

Possible duplicate:
CSS: fixed position on x axis but not y?

I have an HTML page that needs to scroll horizontally that has a fixed position title tag.

If a vertical scrollbar appears (window resizing), I want the title to scroll relative to the rest of the content.

Can anyone think of a possible non-javascript solution?

+1
html css
Dec 29 '11 at 21:16
source share
1 answer

Fixed position has pretty lousy support on iOS devices . Instead of using a fixed position for your title, you should leave it static on the page. Surround your content that you want to scroll horizontally with a container with overflow: auto so that the content scrolls, not the entire page.

Preview: http://jsfiddle.net/Wexcode/vfZjb/

+3
Dec 29 '11 at 9:27 a.m.
source share



All Articles