0

I'm having problems with the dropdownlist button.. the buttons looks weird..

Here is the image: https://i.stack.imgur.com/dJTkR.jpg

HTML markup:

<td class="style 4">
    <select name="ctl00$ContentPlaceHolder1$ucPromotions1$ddlCompany"     
        id="ctl00_ContentPlaceHolder1_ucPromotions1_ddlCompany" 
        style="height:25px;width:167px;">
</td> 

CSS markup:

.style4
{
    width: 185px;
}

What could be the problem?

Edit: problem resolved, it was the padding of the select in one my CSS

i have resolved it with this style

<td class="style 4">
    <select name="ctl00$ContentPlaceHolder1$ucPromotions1$ddlCompany"     
    id="ctl00_ContentPlaceHolder1_ucPromotions1_ddlCompany" 
    style="height:25px;width:167px;padding:0 0;padding-top:0;paddingright-:0;padding- bottom:0;padding-left-value:0; ">
</td> 

2 Answers2

0

It's kinda hard to help you without a living demo but, what if you adjust the same style on the class .style4 and the style of the select?

Set them both at width: 185px; for example.

Hope it helps!

Luis
  • 5,786
  • 8
  • 43
  • 62
0

Your CSS properties in .style4 will not have any effect, because you've set the class attribute value to style 4. Remove the whitespace :)

Btw.: Your HTML has some errors.

Here is the valid one:

<td class="style4">
    <select name="ctl00$ContentPlaceHolder1$ucPromotions1$ddlCompany" id="ctl00_ContentPlaceHolder1_ucPromotions1_ddlCompany" style="height:25px;width:167px;">
        <option value="one">ONE</option>
        <option value="two">TWO</option>
        <option value="three">THREE</option>
    </select>
</td>

Numbers only for CSS classes and IDs are not allowed.

doptrois
  • 1,560
  • 11
  • 10
  • thanks, i write the class style wrong here.. but in the project is fine.. any idea how i can move the button or why is moving as is shown in the image? – Hugo Bringas Jun 09 '12 at 16:39