javascript - jQuery .height() not working with box-sizing: border-border -


i have nav bar have positioned 'fixed' @ top of page. problem have want displace entire page down (dynamic) size of nav depending on size of screen used. basically, want move whole page down height of nav. this, i'm going using padding nav affect it's height. using box-sizing:border-box attribute on nav whenever try , load page, doesn't account height added padding when use jquery's .height() function.

the div 'displacement' class not have except 100% width initially. ugly result along of current code

http://jsbin.com/qomepe/2

can tell me why happening or if i've overlooked something?

try using .outerheight() height of navbar.

from jquery api docs:

"the top , bottom padding , border included in .outerheight() calculation; if includemargin argument set true, margin (top , bottom) included."

http://api.jquery.com/outerheight/


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -