hankknight
asked on
Add !important to all css attributes for a:*{}
Using regex I want to add !important to the end of each attributes for all "a" items.
For example,
a:link {color: red}
Should become:
a:link {color: red !important}
and
#divID p, #divID a:link, #divID a:hover {color: red; text-decoration: none; font-weight: bold;}
Should become:
#divID p, #divID a:link, #divID a:hover {color: red !important; text-decoration: none !important; font-weight: bold !important;}
This should only be done if
a:
is before { and }
For example,
a:link {color: red}
Should become:
a:link {color: red !important}
and
#divID p, #divID a:link, #divID a:hover {color: red; text-decoration: none; font-weight: bold;}
Should become:
#divID p, #divID a:link, #divID a:hover {color: red !important; text-decoration: none !important; font-weight: bold !important;}
This should only be done if
a:
is before { and }
a:link { color: white font-size: 14px; font-family: Helvetica; text-decoration: none }
A:visited {
color: white
font-size: 14px;
font-family: Helvetica;
text-decoration: none }
A:active { color: #f4cd03 font-size: 14px; font-family: Helvetica; text-decoration: none !important }
A:hover {
color: #f4cd03 font-size: 14px; font-family: Helvetica;
text-decoration: none }
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for the question and the points.