-1

I know I can style elements like inputs using input[type=text] {}, but can I do the same with elements with inline styling?

Something like this:

<div style="float: right;"></div>

div[style=float:right;] {}
Hashem Qolami
  • 97,268
  • 26
  • 150
  • 164
michaelw90
  • 513
  • 2
  • 9
  • 23

2 Answers2

2

You have to write as following

div[style="float:right;"] {
/* propery */
}
Tanjima Tani
  • 580
  • 4
  • 18
1

You can still use CSS attribute selectors; For instance sub-string *= selector:

div[style*="float: right"],
div[style*="float:right"] { ... }
Hashem Qolami
  • 97,268
  • 26
  • 150
  • 164