You can disable input elements so that the user cannot enter data into them. Example. The following code uses the disabled Attribute on input Elements. Disable input using CSS. garrulinae. July 30, 2012 at 9:19 pm.input[type"text"]:disabled background:dddddd Viewing 4 posts - 1 through 4 (of 4 total).