I want to create an input fields with rounded corners.
HTML:
<div id="RightColumn"> <input type="text" class="inputForm" /> </div>
CSS:
.inputForm { -moz-border-radius:10px; /* Firefox */ -webkit-border-radius: 10px; /* Safari, Chrome */ -khtml-border-radius: 10px; /* KHTML */ border-radius: 10px; /* CSS3 */ behavior:url("border-radius.htc"); } #RightColumn { background-color:White; }
But IE doesn't show any borders for input fields - neighter rounded nor simple borders. When I remove CSS-style for #RightColumn, IE shows an input fields with rounded corners. But I need background for #RightColumn.
How can I create it?
The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners.
Oh lord, don't do it this way. HTC files are never a good idea for performance and clarity reasons, and you're using too many vendor-specific parameters for something that can easily be done cross-browser all the way back to IE6.
Apply a background image to your input field with the rounded corners and make the field's background colour transparent with border:none applied instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With