• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 310
  • Last Modified:

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
0
Murray Brown
Asked:
Murray Brown
  • 2
  • 2
1 Solution
 
informaniacCommented:
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
 
informaniacCommented:
IE Developer toolbar of Firebug in FF..
0
 
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
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
thanks very much
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now