Rohit Bajaj
asked on
How to force set he height of an element using jquery
HI,
I am using the following code to set the height of the element in jquery :
$('.cke_contents').css('he ight', middleHeight - toolbarHeight);
But the issue is there is already a css rule which sets height to some 100px !important because of this important thing my changes to height using .css function are not getting applied. So one way out of this i think is somehow add !important to the .css function ??
Or there is any other alternative way ?
Thanks
I am using the following code to set the height of the element in jquery :
$('.cke_contents').css('he
But the issue is there is already a css rule which sets height to some 100px !important because of this important thing my changes to height using .css function are not getting applied. So one way out of this i think is somehow add !important to the .css function ??
Or there is any other alternative way ?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
the values are just numbers like 300 or 100.
Also i read up that cssText clears everything else... so if any other styling info was there on the element it will clear that up..whereas in my case i only want to adjust the height
the values are just numbers like 300 or 100.
Also i read up that cssText clears everything else... so if any other styling info was there on the element it will clear that up..whereas in my case i only want to adjust the height
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Indeed, my test confirms that what Kim posted should work.
Open in new window