Question

I have created a bootstrap select control and placed it on footer of my page. Now the issue is that text alignment of my select is not matching with other contents of my footer. here is an image of my footer: enter image description here I want to set the text of my select a bit upwards so that it will look in the same line as other texts are looking e.g. 'Go!' and 'i am a:'. I thought this could be done by setting vertical alignment of the select,so i created css like:

#ftr_fx_select{font-size:11px;font-weight:bold;color:#383838 ;height:28px;opacity:0.8;
 border-style:solid;border-color:#B8B8B8 ;background:white;     vertical-align:text-top;}

and following is my select code:

<select id="ftr_fx_select" class="input-small" >
  <option>--select--</option>
   <option>Student</option>
   <option>Employee</option>
   <option>Business</option>
   <option>Owner</option>
</select>

But it does not work, i also tried to set margin top and bottom but it also fails. So ,please can anyone tell me how can i set it a bit upwords. . .

Was it helpful?

Solution

If you want to move up the text inside selectbox, you should decrease padding-top for that select. You can change all the paddings to position it the way you like.

OTHER TIPS

Yes ,above answer helped me to resolve my problem.I set my css as:

select{padding-top:2px;}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top