Is there a cleaner way to write the same css given that input name f1 to f7
are all type=text
like the first line?
Thanks
#tform input[type="text"] { -moz-border-radius:6px; border: 1px solid green; } #tform input[name="f1"], #tform input[name="f2"], #tform input[name="f3"], #tform input[name="f4"], #tform input[name="f5"] { width:40%; } #tform input[name="f6"] { width:80%; display:block; } #tform input[name="f7"] { width:80%; }
My problem is actually that I have 3 additional inputs: name f8, f8, f10
, also type=text
which I'm letting them set width naturally without width:%;
.
I thought about putting the 40% into the first line and letting the rest override it, but then those additional 3 will take the 40% by default.