Can anyone tell me what the easiest way for me, a fairly new Drupal user, to be able to change the size of the input boxes created when exposing a view filter? I have the input boxes in a block on the left and they extend outside the block. I need the size of the box to be 25 instead of 30.

I've done some searching but cannot find an answer that I can understand enough to try out.

Thanks

Comments

jaypan’s picture

You can do this with CSS. Look for the ID of the form in the HTML. Then use that to target the specific input:

#id input
{
  width:___px; // choose a number of pixels
}

Contact me to contract me for D7 -> D10/11 migrations.

matt1982’s picture

Thanks I was able to take that info and get it figured out.

Other than changing the id I added a .form-text after input as the width was affecting the apply button as well. Placed this in the views.css files and things look good now.

Thanks again!

calbasi’s picture

Where is CSS file I should edit? I should copy views-exposed-form.tpl.php to my theme folder and, then, edit it?

calbasi’s picture

I get it! For Pixture theme I edit:

http://mydomain/sites/default/files/color/pixture-f71b1e62/style.css

But I wonder if every time I edit Pixture theme this information is going to loose.

calbasi’s picture

From pixture readme.txt :

"Making changes to the style sheet

Due to the mechanism of recoloring by the color module, your changes to the style sheet (style.css) in the theme directory does not take effect until you save the theme setting from the theme setting page. It would be easy to change the color scheme to the default scheme (= Girly Pink) and work on the style sheet changes. If you do so, the changes you are going to make to the style sheet would take effect immediately when you reload the current page from the web browser. "

I suppose it is the right way to do it.

But there is still a problem: when Pixture theme get updated, style.css overides my changes, doesn't it? Then, I must remember to reload it to the new style.css :-(