PDA

View Full Version : Min width in IE6 and lower



gh05
Jul 5th, 2009, 02:44 PM
Hi, I have the width of my site displaying exactly as i want it in firefox (uisng minwidth in the css) and in IE7 and above using the folowing javascript code:



<script type="text/javascript">

var font_sizes = new Array( 100, 110, 120 );
var current_font_size = 0;
if ( ( typeof( NN_reloadPage ) ).toLowerCase() != 'undefined' ) { NN_reloadPage( true ); }
if ( ( typeof( opacity_init ) ).toLowerCase() != 'undefined' ) { opacity_init(); }
if ( ( typeof( set_min_width ) ).toLowerCase() != 'undefined' ) { set_min_width( 'pageWrapper' , 600 ); }
if ( ( typeof( loadFontSize ) ).toLowerCase() != 'undefined' ) { event_attach( 'onload' , loadFontSize ); }

</script>


For some reason this doesn't work for IE6 and lower so can anyone give me suggestions on how to make it work? "Pagewrapper" is the panel that i need to set the width of....currently my site articles are stretched across the whole width of the screen unless I set the width.

Thanks.

drhowarddrfine
Jul 5th, 2009, 02:48 PM
min-width does not work in IE6 and is buggy in IE7.

gh05
Jul 5th, 2009, 02:59 PM
min-width does not work in IE6 and is buggy in IE7.

I thought that, so i used the javascript above but i don't understand why it works for IE7 and 8. Do you know how i could ammend the javascript above to include IE6 and lower?

Thanks,

gh05
Jul 5th, 2009, 08:45 PM
I tried using the script here (http://javascript.about.com/library/blwidth.htm) but can't get it to work. Anyone have any other scripts they know will work or know of any tweaks which will make my current one work?