Hi I am using Profile module for my registration page. I have three text fields in that. I want to resize that fields width size as same as username and Email fields in registration page. How to do this?

Thanks in advance...

Comments

kkinfy’s picture

There are two ways to achieve this, either by 1) CSS - by setting the width:some value or 2) by setting size attribute in hook_form_alter

sanjanaa’s picture

Hi, Thank you very much. Can you please mention in which file to do this? And can please give the code?
Because i am new to drupal. I am unable to understand where to change this. Please help me.

Thanks...

kkinfy’s picture

1) View source html (edit-->view source) on user registration page and note down the element ids. For example if the field is
<input type="text" maxlength="60" name="name" id="edit-name" size="60" value="" class="form-text required" />
then the id for this element is edit-name.
2) Go to themes/yourtheme folder
3) There you will find a file style.css
4) Now if I want to reduce the width of name field I would add the below style to the end of style.css

#edit-name
{
width:100px;
}
sanjanaa’s picture

Thanks a lot. Now it works. It saved my time. Lot lot lot of thanks.