Question

I'm using IE 7 . can anyone suggest a simpler code for what I'm trying to do .

here's my html:

    <span id="mainSpan" class="deleteIcon">
        <input type="text" id="txt1" />
        <span id="btn" onclick="var x = document.getElementById('txt1'); x.value = ''; x.focus();"></span>
    </span>

and my css:

        input {
            font-size: 20px;
            width: 250px;
        }
        #mainSpan {
            position: relative;
            border: 1px #aaa inset;
        }
        span.deleteicon span {
            border: none;
            margin-left: 1px;
            position: absolute;
            display: block;
            top: 5px;
            width: 18px;
            height: 18px;
            background: url('file:///path-to-clear.png') no-repeat center;
            cursor: pointer;
        }
        span.deleteicon input {
            border: none;
            margin: 0px;
            padding-right: 0px;
        }

but it looks like this in IE 7:

enter image description here

i want to make it like the spotlight in an iPhone:

enter image description here

and do I need css or javascript if i want the 'clear' button to show up when cursor is in the box ? like this ..

enter image description here

it's easy to do it in other newer browsers but need to use it on IE 7 .

thanks for anyone who can share their code . =D

Was it helpful?

Solution

Try ccs3pie

It helps with ancient IEs. You'll be able to use border radius and other cool stuff.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top