开发者

CSS - Prevent Submit Button From Getting Focus

开发者 https://www.devze.com 2023-02-18 09:28 出处:网络
In Opera when a text field is focused, the submit button gets an ugly black border. You can see this in a screenshot.

In Opera when a text field is focused, the submit button gets an ugly black border.

You can see this in a screenshot.

CSS - Prevent Submit Button From Getting Focus

In the bottom of the image the textarea is focused and submit button looks awful. How can I prevent this using CSS?

UPDATE: the CSS for the button is

.uiGreenButtonOuter {                     
 border: 1px solid  #234723;
 cur开发者_如何学Gosor: pointer;
}

.uiGreenButtonInner {
 margin: 0;
 font-size: 11px;
 display: block;
 background: #3E7E3E;
 padding: 4px 6px;
 border-width: 1px;
 border-style: solid;
 border-color: #6AB76B #3A763B #3A763B;
 color: white;
 text-align: center;
 text-shadow: 0 1px 0 #234723;
 cursor: pointer;
}

.uiGreenButtonOuter:hover .uiGreenButtonInner {
 text-decoration: none;
 background: #4C9B4C;
}

.uiGreenButtonInner:focus{
 outline: 0;
}


This will do the job:

input[type="submit"] {
    border: 0;
}

if your html is set like this:

<form action="">
    <textarea name="fos"></textarea>
    <span class="uiGreenButtonOuter">
      <input class="uiGreenButtonInner" type="submit" name="send" value="Nyedva" />
    </span>
</form>

Here is demo


you can use :focus or :blur pseudo-classes to do the trick. We need the code to understand the exact problem.

eg.

textarea:focus {/* your css here */}
0

精彩评论

暂无评论...
验证码 换一张
取 消