Closed (fixed)
Project:
Drupal core
Version:
7.0
Component:
forms system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Dec 2009 at 11:47 UTC
Updated:
24 Feb 2011 at 05:20 UTC
Is it possible to set width of select element, the #size will set number of drop down field, is there a property to set width in characters
many thanks
Darko
Comments
Comment #1
dark-o commentedI worked out how to do it with CSS, so for others here is the answer:
use #prefix to set divs with class:
then change size in CSS:
Comment #2
alextronic commentedThis will only wrap the select into a
Anyone?
Comment #3
alextronic commentedI can only think of using jQuery...
Comment #4
scotthorn commentedI found a way where you can still use css with the prefix, suffix options. The div class you give it contains another div which contains the select field, so the css looks like this:
I'm using drupal 7, though. It's possible that drupal 6 renders the divs differently, but the method should still work.