My Submit button has purple border around it in IE, but not in Chrome. How do I get rid of it in IE?
Image: (Top one is in IE, Bottom one is in Chrome - I just cropped it into an image) http://i.imgur.com/Qb6pI.png
My code is:
HTML:
<div style="float:right; border:0px;">
<input type="submit" class="submitorder"/>
</div>
CSS:
.submitorder {
background-image: url('https://www.amleo.com/images/art/SubmitOrderSprite.png');
background-position: 0px 0px;
width: 205px;
height: 52px;
font-size:0px;
}
.submitorder:hover {
background-position: 0px -62px;
}
It looks like you're removing the border on the div, not on the input. Modify your CSS to the following:
.submitorder {
background-image: url('https://www.amleo.com/images/art/SubmitOrderSprite.png');
background-position: 0px 0px;
width: 205px;
height: 52px;
font-size:0px;
border: 0 none;
}
That should sort you out.
try the following code *border :none; / for ie7 /
_border:none; / for ie6 /
border:none \\0/IE9; / * ie9 specific not sure* /
i can't actually see the purple you are speaking of by it's a common problem with IE. You could get rid of it just by adding border:none
to your CSS.
First off, inline styles are never good practice.
As for the border, try:
.submitorder {
border: none;
background-image: url('https://www.amleo.com/images/art/SubmitOrderSprite.png');
background-position: 0px 0px;
width: 205px;
height: 52px;
font-size:0px;
}
Fore IE try adding outline: 0;
& border:none
.submitorder {
background-image: url('https://www.amleo.com/images/art/SubmitOrderSprite.png');
background-position: 0px 0px;
width: 205px;
height: 52px;
font-size:0px;
outline:none;
border:none;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.