views:

494

answers:

3

is there a way to make rounded corners on elements so that they are visible in Internet Explorer.

Currently, I am using curvycorners.js but it only works on block elements...

A: 

The curvycorners.js is good choice to go with, and as opposed to inline elements, you can apply corners to block level elements only because they can have width and height. And you can make any element block level by setting their style to display:inline-block

Sarfraz
I'm pretty sure he'd want to use `inline-block` so that the input elements behave the same, but can have width and height.
Matt Ball
@Bears will eat you: Yeah that would be fine i think. Thanks
Sarfraz
i tried that, but no go...
Mladen
A: 

I don't know how curvycorners.js works; would setting your inputs' display CSS property to inline-block work?

Matt Ball
curvycorners.js is javascript way to make rounded corners. In fact, it dynamically adds some make up tags around the input tag. You can study the make up using element.innerHTML, in which element is the paraent element of the make up tags.
unigg
A: 

I don't expect it to be possible, as IE uses system controls to render inputs. This caused a lot of errors during last 10 years. If there is such a way - it must be a nasty hack I suppose ;)

But have faith - I can help You with the simplest idea ever!

<div class="corners">
<input type="text" style="border:1px solid #fff" />
</div>

give the div and the input #fff background colours and set input's border to #fff and set div's border to #000 and call the curvycorners on that div. Some padding setting might be needed.

Edit: O, I forgot. For those who don't know. The border on input is important as it overrides using the system default look for inputs so that they are not all that vista-nasty, You know.

It might be bigger than before, but it's done. :)

naugtur