简体   繁体   中英

Focus on textbox

I have just put some css on a textbox :

 #TxtBoxDescription
{
height: 30px;
padding: 5px;
width: 185px;
background: rgba(255,255,255,0.4);
border: none;
float: right;
margin: 10px 3px;
-moz-transition: all 0.2s ease-in-out;
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}

 #DropDownListPriority
{
float: right;
height: 30px;
width: 95px;
background: rgba(255,255,255,0.4);
margin: 10px 3px;
}

  #LkAddBug
 {
color: rgba(255,255,255,0.8);
font-family: 'Quicksand' , sans-serif;
float: right;
width: 95px;
height: 22px;
text-decoration: none;
display: block;
background: rgba(255,255,255,0.4);
margin: 10px 10px 10px 3px;
text-align: center;
padding: 4px 0;
letter-spacing: -1;
-moz-transition: all 0.2s ease-in-out;
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
 }

And now when I want to click on the textbox to write some text, I can't click on it in the middle, I have to click on the bottom to get the focus ... That is so weird, so I think it might be a css problem but I can't fix it ... Can someone help me ?

Thank you !

As shown in this fiddle , that CSS doesn't affect either a textarea or text input. Tested in both IE and Firefox.

You either have something else which is causing your problem or you've missed out a pertinent piece of information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM