CSS Style Element if it does not contain another specific type of Element [migrated]
- by Chris S
My CSS includes the following:
#mainbody a[href ^='http'] {
background:transparent url('/images/icons/external.svg') no-repeat top right;
padding-right: 12px;
}
This places an "external" icon next to links that start with "http" (all internal site links are relative). Works perfectly except if I link an Image, it also get…