/    Sign up×
Community /Pin to ProfileBookmark

How do I remove a default box shadow around required elements? (chrome in particular)

I’m making a contact field for a website, and Im trying to get rid of the ugly default red box shadow that chrome automatically puts around required elements like my input forms for text.
I have been using this method:

[CODE]input:required, textarea:required {
-moz-box-shadow:none;
-webkit-box-shadow:none;
-o-box-shadow:none;
box-shadow:none;[/CODE]

and this works for firefox, but chrome has a blue box shadow around the elements now. what am I doing wrong here? hmm

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@rtretheweyFeb 22.2014 — The pseudo-class 'required' is not yet widely supported. You might try a pseudo selector instead. Something like:
<i>
</i>input[required='required'], textarea[required='required']

Otherwise, you'll just have to add a new, specific class to the tags.
×

Success!

Help @46andtool spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...