Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize the minimum width CSS style of CheckBoxList items by asp.net

Shulou Source: shulou.com Published: 2022-06-03 06:16:03 10月01日 Update

This article mainly shows you "asp.net how to achieve the minimum width of CheckBoxList CSS style", the content is easy to understand, clear, hope to help you solve your doubts, the following let Xiaobian lead you to study and learn "asp.net how to achieve the minimum width of CheckBoxList CSS style" this article.

In ASP.NET, the selections in CheckBoxList are all automatic widths, and the width settings are not set in the properties.

The copy code is as follows:

/ * minimum temperature * /

.min _ width {min-width:300px

/ * sets max-width for IE * /

_ width:_expression (document.body.clientWidth < 300? "300px": "auto")

}

It is written as follows:

The copy code is as follows:

.ckblstEffect td

{

Min-width:80px

_ width:_expression (document.body.clientWidth < 80? "80px": "auto")

}

The copy code is as follows:

It doesn't work in roaming 4 compatibility mode (IE7). If you look at the expressions in the style carefully, it doesn't feel right.

Just change it to the following style.

The copy code is as follows:

.ckblstEffect td

{

Min-width:80px

Width:_expression (this.offsetWidth < 80? "80px": "auto")

}

The minimum width can be displayed correctly in IE10, roaming 4 extreme speed mode and compatibility mode. This style can be used not only for CheckBoxList, but also for DIV, etc.

The above is all the content of the article "how asp.net implements the minimum width CSS style of CheckBoxList". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Code width style minimum content pattern article learning help alignment function attribute easy to understand more organization knowledge ribbon industry expression information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Linux Docker OPPO Reno Shulou Information