Similar to selecting
img[title="test"]
float
left
Peter W solution needs to be fixed like this: (changed ~=
to *=
)
img[style*="float:left"] {
margin: 5px 15px 0px 0px;
}
img[style*="float:right"] {
margin: 5px 0px 0px 15px;
}
The only issue is that it makes an exact match, so float:right
will match, while float: right
wont (notice the extra space).
I tested successfully in Chrome and IE9, but in IE emulation mode will not work ...