HTML and CSS   XSLT   JavaScript   Images   Soft   Etc  
Vladimir Tokmakov

Emulating disabled for browsers 28 June 2005


Task:

Make label elements with  disabled attribute look like they do in IE.

Use CSS attribute selector and grey out the element.

How it looks in the browser

01 
02 
03 
04 
05 
06 
07 
<style type="text/css">
    label[disabled="true"] { opacity: 0.4; }
</style>
<form>
    <input name="something" value="No text" disabled="true" />
    <label disabled="true">can be put here</label>
</form>

Order a design...