Tag: css

ASP.NET Forms Disabled CSS for BootStrap

The following CSS is to handle Enabled set to true in any WebControl.

/* -- Bootstrap Additions - ASP.NET Disabled ----------------- */

.radio.aspNetDisabled label,
.checkbox.aspNetDisabled label
    cursor: not-allowed;

    pointer-events: none;
    cursor: not-allowed;
    filter: alpha(opacity=65);
    -webkit-box-shadow: none;
    box-shadow: none;
    opacity: .65;

    background-color: #fff;
    border-color: #ccc;

    background-color: #428bca;
    border-color: #357ebd;

    background-color: #5cb85c;
    border-color: #4cae4c;

    background-color: #5bc0de;
    border-color: #46b8da;

    background-color: #f0ad4e;
    border-color: #eea236;

    background-color: #d9534f;
    border-color: #d43f3a;

.dropdown-menu > .aspNetDisabled > a,
.dropdown-menu > .aspNetDisabled > a:hover,
.dropdown-menu > .aspNetDisabled > a:focus,
.dropdown-menu > li > a.aspNetDisabled,
.dropdown-menu > li > a.aspNetDisabled:hover,
.dropdown-menu > li > a.aspNetDisabled:focus
    color: #777;

.dropdown-menu > .aspNetDisabled > a:hover,
.dropdown-menu > .aspNetDisabled > a:focus,
.dropdown-menu > li > a.aspNetDisabled:hover,
.dropdown-menu > li > a.aspNetDisabled:focus
    text-decoration: none;
    cursor: not-allowed;
    background-color: transparent;
    background-image: none;
    filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);



Default Style Sheet v1.1

If you missed my first post, default style sheet is meant to be a starter style sheet for a new project. I’ve made a few adjustments to default style sheet. The button styling has had some minor tweaking (rounded corners, color changes, etc.) and the sheet has some random cleanup.

I have also changed the location of the CSS sheet. The is no longer a zip file available for download. You can now view the CSS sheet directly in the source view of my CodePlex project: Jeremy Knight CodePlex Project.

Again, my thanks go out to the following:

Default Style Sheet v1.0

I’ve been using a reset style sheet for years to smooth out browser inconsistencies but at the start of every project there was always a period of rework. A reset style sheet basically zeros out the styles set by a browser and gives you a blank slate to work with. But what if I don’t want a blank slate over and over again?

That’s where the default style sheet comes in. A default style sheet is zeroes out the styles of a browser but then defines default styles for common HTML elements. There are a few default style sheets out there but I’ve always found they didn’t default enough elements. The following link will take you to a zip file download containing my version of a default style sheet.

Default CSS v1.0

My thanks go out to the following: