Solved DropDown squashing together

Posted on 2012-08-14
Last Modified: 2012-08-18

In my web app I am having a problem with the items in a DropDown squashing together as shown in the image
Question by:murbro
    LVL 20

    Expert Comment

    What css is applied to the dropdownlist?

    Author Comment


    I am not sure how to show you that. I can view the CSS properties. Where do I get that?
    LVL 20

    Expert Comment

    IE Developer toolbar of Firebug in FF..
    LVL 1

    Accepted Solution

    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):
    	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" />

    Open in new window


    Author Closing Comment

    thanks very much

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now