开发者

Unable to get a proper background image in an panel inside a fullscreen scrollview in GWT

开发者 https://www.devze.com 2023-04-12 11:20 出处:网络
I\'m having trouble with setting the main background image for a page. I\'ve got a full screen scrollview, in which I have a centered ~1000px wide flowpanel. The issue is that I want the flowpanel to

I'm having trouble with setting the main background image for a page.

I've got a full screen scrollview, in which I have a centered ~1000px wide flowpanel. The issue is that I want the flowpanel to have a background image that goes from the top of the screen to the bottom, even when the flowpanel is half-empty, and when the flowpanel extends below the screen - just like any normal开发者_开发知识库 website.

If you set the height of the flowpanel at pageload/resize to the height of the screen it works properly until the flowpanel expands to become bigger than the screen - at which point the background image stops at the original set height, as if the background image itself is not resizing along with the flowpanel.

If I don't initially resize the flowpanel it expands fine, but you don't have any background image below the height of the flowpanel until it fills the screen.

I can't put the background image in the scrollpanel itself, because when the scrollbars appear the inner flowpanel is shifted to the left by the width of the scrollbar, which mis-aligns it's contents with the background image.

This must be a very common approach to building a page, so there must be some solution that I'm missing. The app is aimed at IE6 if that helps.


I think I might have fixed it - I've now set a min-height + ie6 min-height on the panel depending on the window size, which then refreshes with a window size change. Seems to be working properly.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号