disabled styling for DIV element

css, css-selectors, html

Solution

Try to use the Attribute Selector:

div[disabled]{}

See for more Information:

https://www.w3schools.com/css/css_attribute_selectors.asp

Problem

I am trying to style disabled state for div I have code ``` <div disabled> Welcome </div> <style> div:disabled{ background-color:#f1f1f1; } </style> ``` I don't have any class or ID present on the element. It is system generated. I want make the background color light gray.

Original source