Minimum width to stop scrolling very small.

liunx

Guest
Hello.
Hope you're all well!

I hope someone can help with this, as it's getting me down now!!!

Basically, I want to prevent visitors from being able to stretch my site very small, when they do this, divs "go into" each other, and it looks very odd indeed, i.e. input fields go outside of their divs and suchlike.

I've heard "min-width" doesn't work with IE so that's not exactly viable.
I've tried other methods, such as width: expression( document.body.clientWidth>535 ? 'auto' : '535px' ); within my container div, but to no avail.
Some of these methods indeed make you need to scroll, but it doesn't stop the divs actualyl being stretched small. I want the minimum to be say ... 600px in width.

Any help with this is much appreciated indeed.

Regards,How about a DIV that's 1 px high and 600 wide, with nothing in the DIV aside from a good ol' ?

Or the old standby, a spacer.gif?To actually show the non-breaking space thingy in these forums you have to encode the ampersand:  Hiya. I've tried both ways...using a spacer.gif with a width of 700px, and a height of 1px, this indeed makes it "scroll"...but in Konqueror which I just tried, as you continue stretching, the divs still go into each other.
I'm totally confused! :confused: :confused: :confused:min-width (with expression hack for IE) works just fine. There is no need for extra divs and spacer.gif :rolleyes:

In IE 6.0 you may need to use document.documentElement.clientWidth depending on your doctype.

width: expression((document.documentElement.clientWidth < 700? 700 : (document.documentElement.clientWidth > 900 ? 900 : document.documentElement.clientWidth)) + "px");
 
Back
Top