Centering a fixed element, but scroll it horizontally...

Having some issues getting this to work. PLEEEEEEASE help. I would like an element fixed to the top of the viewport, when the user scrolls down the page it remains at the top of the viewport... easy. If the window is narrower then 960px the horizontal scrollbars appear. If the window is scrolled horizontally I would like the content inside this fixed element to scroll with it. Please check out the demo, the two green boxes should always line up. Make your window narrow and scroll horiz, notice how they no longer line up. Is this possible without JavaScript? Should work in IE7+ and not totally break in IE6. http://www.louiswalch.com/beta/t/_scrolltest4.html

以上就是Centering a fixed element, but scroll it horizontally...的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏