In my application, I need to take input from the user for a column named 'body' in a table in the database.
My code in the .ctp file is:
echo $form->input('body',array('style'=>'width: 900px'));
In this way, i am able to specify the width of the body field which works fine. But, I want to specify the height as well.
I tried echo $form->input('body',array('style'=>'width: 900px height: 500px'));
echo $form->input('body',array('style'=>'width: 900px','style'=>'height: 500px'));
The first one doesnt work for either width or height and the second one modifies only the height but not the width.
Can someone please tell me how to overcome this issue.
Thank you very much in advance.
Best Answer
would be the recommended and preferred manner.
Alternatively, make sure your inline CSS is correct:
Your code appears to be missing a
;
, and of course by specifyingstyle
twice you will be overwriting the previous value.