Adjust Width & Height of a Control (ASP.NET)
I am just starting to study ASP.NET from my WPF Knowledge. I think the UI designing is very difficult in ASP.NET compared to WPF XAML design.
I have a problem in my UI layout. In WPF we use Width=" * " and Height=" * " to adjust height and width of the controls like listview, listbox so that the application can run in any resolution without overlapping ? What is the a开发者_如何学编程lternate way to set height and width in ASP.NET?
Ideally you'll want to be setting the style's of your controlls using CSS.
If you have a control that has a CssClass="myControl" then in your CSS you'll be able to do the following:
.myControl{
width: *px;
height:*px;
}
Where * is a numerical value. You can also change the value type from px to % and other value types.
Using a % value type will allow you to cater for multiple resolutions whilst retaining a similar feel to your application.
Use '%' for specifying height and width.
Specified as a of containing block's width.
Read
width and height
精彩评论