Problem with CSS Positioning

7 replies. Last post: January 7, 2010 8:49 PM by Andi Santoso
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

Hi,

I would like to start using CSS to position controls rather than my company's current default of absoute positioning, however I'm having trouble aligning WebCombo with standard ASP.NET / HTML controls.

I'm creating a simple form with one column for field label and a second for the associated control. If I use the following CSS to define the label column, then the WebCombo does not lign up with the other controls.

        .labelUsingFloat
        {
	        display: block;
	        float: left;
	        width: 13em;
        }

Also, each pair of label and data is surrounded by a div element, which I would expect to cause any subsequent pair of label and data to go to the next line, however this is not the case with a div that contains a WebCombo.

When I format the labels and controls using a table then everything is nicely aligned and looks correct, but I don't want to have to use a table!

Can anybody help? I'm using Visual Studio 2008 with Web UI Studio 2009.

Example page attached.

 

1 attachment
All times are GMT -5. The time now is 12:35 PM.
Previous Next