Hi all:

I'm struggling with this one.  I need the following, which I can't get to
work because IE7 seems to have a bug where when you set the width of an
<input> field using CSS to a percentage it calculates based on the viewport
and not the containing element.  So I figured I'd add an IE fix like the
following, but I can't get it to work.  FYI, there is a class of
"text-field" on the <input> elements.

$(document).ready(function(){
        window.onresize = function() {
                var width = '' + (window.innerWidth - 600);
                $('input.text-field').css("width",width);
        }
}); 

I know my approach is probably all wrong anyway, so go lightly on me and
recommend a more jQueryish way to do this; this is all new to me and I'm
just trying figure things out.

-- 
-Mike Schinkel
http://www.mikeschinkel.com/blogs/
http://www.welldesignedurls.org
http://atlanta-web.org 

Reply via email to