Jump to content

Changing Window Size Breaks My Layout


chibineku
 Share

Recommended Posts

My layout breaks if I change the window size in IE7/AOL, so I added a simple javascript function that fires on window.onresize, but no matter how I change the location I get problems.window.location.href = history.go(0) makes the page flash constantlywindow.location.reload() does the same.The only one that works iswindow.location.href = window.location.hrefBut even then it blinks a few times. Is this just a bad idea, or is there a better way? Is there a way that doesn't involve javascript? I am not 100% sure I want to do it this way because it will mean users might lose form data they're inputting, but I wanted to give it a shot, see its merits or demerits.I've been strongly advised against this method on stackoverflow.com, and since I can't even get it to work smoothly I take their point, but I can't think of any other better way of fixing my problem. I guess it's a CSS problem, but I don't know what's up with it. If anyone wants to take a look: stupid onresize=layout.break site :-p

Edited by chibineku
Link to comment
Share on other sites

I'm not sure how. I generate an inline stylesheet for AOL/IE7 which changes the normal layout from a fluid-center-2-sidebar layout to a totally fixed width layout which works perfectly well at all sizes, but it needs to be redrawn to make it work right. To be fair only the bar between my horizontal menu and the main content section goes off kilter, but it is ugly. I will play around with it more I guess.Okay, strange: if I resize the window, things go out of position, but if I hover over a menu item, it all realigns itself perfectly...

Edited by chibineku
Link to comment
Share on other sites

In IE7? It still behaves funny for me. If you go from a max window to smaller its particularly noticable.

Link to comment
Share on other sites

are you talking about the breadcrumb bar? have you tried given it a fixed height?(36px?) at the moment it seems to use line-height 30px, which what the menu button seems to push it down to. If you make height 36px it should remain the same height.also IE7 does not seem to show 5% margin at the sides, compared to Firefox, it only shows beyond the actual screen size on the right side, which forces horizontal scroll bar to appear, well on 1024 wide screen anyway.

Link to comment
Share on other sites

Hiya. Yeah, the breadcrumb bar is one of the things that goes out of alignment. Giving it a fixed height of 36px makes strange things happen elsewhere, though it does make it stay in the right place when I resize the window. Everything else, though...I have no idea.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...