Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cursor blinking through element

Status
Not open for further replies.

weedz

Programmer
Dec 5, 2000
718
NL
I have the following problem specifically in IE.
I have a basic html with an input control and a div.

The div overlaps the input control using position:absolute.
In essence covering the input control. In IE the cursor can still be seen blinking through the div element.

HEre is my simple test code:

Code:
<html>
<body>
<input type="text" size="50" length="50">
<div style="position:absolute;top:10pt;left:10pt;background-color:red;width:100px;height:100px">
</body>
</html>

Can I make the cursor hide? Remember this is specifically IE behaviour.

Thanks for any help in advance.

Weedz

Weedz (Edward W.F. Veld)
 
I am not aware of this specific issues, but it is known that input elements are hard to cover. You could add javascript that would remove the focus of the input element, but there are a lot of questions that are raised by your code:

1. If input is hidden, why not use hidden field?
2. If input should be hidden at first and show later, why not play with display or visibility setting in CSS?

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Thanks for your reply. The sample code is just to show the problem. The actual problem pops up when a menu option drops down and then covers an input control that happens to be there.

I do not want to hide the input but to not have the cursor blink through the element that happens to cover the input control.

any help is welcome.

Weedz (Edward W.F. Veld)
 
I fear that input elements, since they are rendered by the OS rather than the browser itself, are notorious for sticking out on top of other elements. Unfortunately, there is not much to do. Old menus used to hide the input elements or wrap them in an iframe to hide them from view. If you blur the focus of the input field when the menu is in use it should help with the cursor blinking, since cursor should only appear when the field has focus.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Thanks for your reply, much appreciated.

Weedz (Edward W.F. Veld)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top