Apply input-only style = text

I have CSS code like this

div ul li input{ width:70%} 

What if I want this style to apply only to input elements of type = text ?

+4
source share
2 answers

Use attribute selector

 div ul li input[type=text] { width: 70%; } 
+11
source
 div ul li input[type=text] { width:70% } 
+4
source

Source: https://habr.com/ru/post/1380417/


All Articles