Neil_Bradley
asked on
Find the height of a div using jquery
I would like to set the height of a div (id="main") to the same height as a div (id="pageContents") minus 120px.
To summarize:
height of #main is equal to the height of #pageContent -120px.
Can anyone assist?
N
To summarize:
height of #main is equal to the height of #pageContent -120px.
Can anyone assist?
N
ASKER
How could this be modified to subtract 120px from the #main?
IE
$("#main").height( $("pageContent").height() -"120");
IE
$("#main").height( $("pageContent").height() -"120");
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Perfect thanks,
Cheers,
Neil
Cheers,
Neil
Or try :
$("#main").css("height", $("pageContent").css("heig