I am using the following CSS class to hide a textbox in an asp:UpdatePanel control to accept input from a USB card reader.

<style type="text/css"> 
    .USBBox 
    { 
        position: absolute; 
        left: -999em; 
    } 
</style> 

When I click an asp:LinkButton control that is configured to be an asp:AsyncPostBackTrigger for the update panel the control appears on the page and the CSS class does not work.

This behavior is displayed in IE7. It works as expected in FireFox 3.5.7

What would cause this behavior and how do I resolve it

  • I went ahead and removed the `asp:LinkButton` from the page as an asynchronous trigger. Michael Kniskern almost 7 years ago

3 answers

0
points

If you don't want the textbox to show up, try using display:none; instead of left:-999em; that should do the trick.

Answered almost 7 years ago by Juan Di Diego
  • I have tried this and it does not resolve the issue. Michael Kniskern almost 7 years ago
Mottie 1134
0
points

Try adding top: 0; because IE is dumb and won't assume it.

Answered almost 7 years ago by Mottie
  • Right and wrong....right about IE being dumb. Wrong, the `top` attribute did not resolve the issue. Michael Kniskern almost 7 years ago
0
points

Depending on the situation you might need to add an extra div (static if I remember correctly) around the .USBBox-element.

But without the code in front of me It's difficult to say. Maybe this bug-report can help.

Answered almost 7 years ago by Jens Hedqvist