ASP.net DropDown squashing together

Hi

In my ASP.net web app I am having a problem with the items in a DropDown squashing together as shown in the image
Image1.jpg
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
 
nkishCommented:
In your CSS file for your project, you can create an element that controls font attributes, along with padding and margin.  Then just set the DDL control CssClass property to the element.

For example, put this element in your CSS file (you can change the properties as needed):
.DDLStyle
{
	color: #000000;
	font-family: Verdana, Arial;
	font-size: medium;
	font-weight: normal;
	padding: 2px;
	margin: 0px;
}

Open in new window

Then in your aspx, just referrence the CSS element on the Drop Down Control like this:
<asp:DropDownList ID="DDL_Answer" runat="server" CssClass="DDLStyle">
	<asp:ListItem Value="" Text="Select ..." />
	<asp:ListItem Value="N" Text="No" />
	<asp:ListItem Value="Y" Text="Yes" />
</asp:DropDownList>

Open in new window

0
 
Obadiah ChristopherCommented:
What css is applied to the dropdownlist?
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Hi

I am not sure how to show you that. I can view the CSS properties. Where do I get that?
0
 
Obadiah ChristopherCommented:
IE Developer toolbar of Firebug in FF..
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
thanks very much
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.