Jump to content

Changing Window Size Breaks My Layout


chibineku

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

Link to comment
Share on other sites

Why don't you just fix your layout so it doesn't break onresize instead?

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...

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...