/    Sign up×
Community /Pin to ProfileBookmark

Focus specifications and input fields styling

I have used styling for input fields like:

[code=php]

.table1 input:focus {
border: 1px solid #000000;
}

[/code]

It works when I click inside input cell and it is validated. Issues is with the button under table. It has also the same styling but input button which should not react to click. How to avoid only this button styling for focus CSS.

[code=php]

<input type=”submit” class=”button1″ value=”Send inquiry” name=””>

[/code]

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@jedaisoulAug 21.2014 — You have not given enough of the code, but the CSS you have given sets the border for all input fields in table1 when they receive focus. If that is not what you want to happen, then don't set it!!! Have you set a class on the input fields that you DO want to respond to receiving focus? If so use that in the CSS instead.
Copy linkTweet thisAlerts:
@toplisekauthorAug 22.2014 — You are right. Thank you.

outline: none;

box-shadow: none;

I think it should work in all version and browser.
×

Success!

Help @toplisek 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.6,
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,
)...