Forums

Change width of drop down box

mgrunnell 04 Dec, 2008
I read a previous article where somebody wanted to change the width of the drop down boxes. I have a typical date of birth set of boxes, and it doesn't look good when the boxes are so much wider than the number to be selected.

It was suggested that we use the style="width:value" method in the html of the form. I am not sure how to do this so I have pasted a part of my form below Could you please tell me where in the code this should go. Thanks

Mark

<DIV class="form_element cf_textbox" ><LABEL class=cf_label >Pupil/Student Name</LABEL><INPUT class=cf_inputbox id=text_14 maxLength=30 size=30 name=text_14 ></DIV>
<DIV class=clear > </DIV></DIV>
<DIV class=form_item>
<DIV class="form_element cf_dropdown" ><LABEL class=cf_label >Date of Birth (Day)</LABEL><SELECT class=cf_inputbox id=select_12 size=1 name=select_12 ><OPTION value="please select" selected >please select</OPTION><OPTION value=1 >1</OPTION><OPTION value=2 >2</OPTION><OPTION value=3 >3</OPTION><OPTION value=4 >4</OPTION><OPTION value=5 >5</OPTION><OPTION value=6 >6</OPTION><OPTION value=7 >7</OPTION><OPTION value=8 >8</OPTION><OPTION value=9 >9</OPTION><OPTION value=10 >10</OPTION><OPTION value=11 >11</OPTION><OPTION value=12 >12</OPTION><OPTION value=13 >13</OPTION><OPTION value=14 >14</OPTION><OPTION value=15 >15</OPTION><OPTION value=16 >16</OPTION><OPTION value=17 >17</OPTION><OPTION value=18 >18</OPTION><OPTION value=19 >19</OPTION><OPTION value=20 >20</OPTION><OPTION value=21 >21</OPTION><OPTION value=22 >22</OPTION>
GreyHead 04 Dec, 2008
Hi mgrunnell,

You can put it inside the <select . . . > tag
<SELECT class=cf_inputbox style='width:120px;' id=select_12 size=1 name=select_12 >
then change the 120px (pixels) to suit your layout.

Bob
mgrunnell 07 Dec, 2008
Thanks, I'll give it a whirl

Mark
mgrunnell 07 Dec, 2008
Thanks, it worked a treat.

However I do have another 'problem'. I would like my date of birth fields to be on the same row. I have set this up on the 'email temlates' option, as shown below:

Date of Birth
(Day){select_12} (Month){select_11} (Year){select_10}

but the layout appears as per the original wizard design.

Am I missing something?

Thanks in advance
Mark
Max_admin 07 Dec, 2008
Hi mgrunnell,

open the HTML button of the editor (its a small button to see the source) then clean all code and start making your template!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.