[jQuery] Positioning and Sizing elements
I've been playing with positioning an iframe under a div to ensure the
div appears over SELECT lists in IE. In doing so I learned a number of
JQ things:
1] The $.css(x, "height") and $.css(x, "width") functions appear to
return incorrect values. Refer to this test page
http://solidgone.com/jquery/test_div.html. Click the link, and see the
blue bordered iframe is larger than the red bordered div. The div is set
to 50px, yet the .css function returns 52px.
2] I had to provide units for height and width but not top and left:
$("#ifr").css({
height:$.css(e,"height")+"px",
width:$.css(e,"width")+"px",
top:$.css(e,"top"),
left:$.css(e,"left")
});
3] The object to be positioned needed to have a style of "position:
absolute;" otherwise FF refused to move :)
~ ~ Dave
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/