whats the correct way to deal with textboxes which extend beyond a themes layout?
for example : I have a 3 column layout and the 'message' box of contact.module is too wide.
Do I create a new function in template.php with a smaller width or can this be dealt in css?
Or can I set the size of all 'textarea' fields somewhere globally?

Thanks,

V

Comments

nevets’s picture

If you want to override all resizeable textareas you can use

.resizable-textarea {
  width: 2in;
}

where width is the value you desire. It could be in pixels (px), precent (%), inches (in) or a number of other units.
For non resizable textareas I believe you want to use

.form-textarea {
  width: 2in;
}

You can restrict either of these to a particular form by placing the form id in front like; #node-form .resizable-textarea.

drupalxykon’s picture

Thanks

Any solution with phptemplate?

nevets’s picture

That is a phptemplate solution, you just need to style.css file that is part of theme (I think I mistyped before and said styles.css)

drupalxykon’s picture

yes thanks. that solution worked. I changed it to 75% in resizeable. instead of form-textarea I changed .formitem textarea{
}

drupalxykon’s picture

following the suggestion of 'Heine' from IRC I added phptemplate_theme_textarea and reset $cols.

javascript will resize the textbox to whatever percent its set to though.

tyswan’s picture

Hi vrao,

I'd like more details on how to do this. I've tried the css, but can't really hook into the speciic fields I want without messing other things up.

Some quesitons:

  • So do I add a function to my template.php called phptemplate_theme_textarea? or is it called phptemplate_mytheme_textarea?
  • In the function I reset $cols to say 50 instead of 60?
  • does the function return $col, or nothing?
  • What calls this function?

Thanks for your help.

Cheers,
--
tys