This has been driving me mad someone help coz i don't seem to see where the problem is.
<div id="parent">
<div id="child"></div>
</div>
<script>
$('#parent').height(300)
$('#child').height($('#child').parent().height()-10); //EDITTED LINE
</script>
the above is the logic of what i need to do. I check the html tag of "#parent" it say style="height: 300px;" however the child has a value of -10 :( should have 290 ; I have checked in DOM, the value is right i have also tried the .css('height') but with no luck. has anyone experienced this kind of problem ?if so whats the solution :) put me out of missary pls
Sorry guys it is the "parent().height()" where the problem stands. See script again (sorry again)