CSS has historically been one of the areas of big difference between browsers. jQuery provides a set of cross=browser functions for working with CSS values that commonly appear in different situations.
width()
and height()
: get or set the width or height property of an elementinnerWidth()
and innerHeight()
: get or set the inner width/heightouterWidth()
and outerHeight
: get or set the outer width/heightoffset()
: get the coordinates of an element relative to the documentposition()
: get the coordinates of an element relative to the offset parentExample DIV element