When you hover over an input field in the table, the entire cell turns grey except for a few pixels at the top. Why is that? I've tried setting everything I can think of (margin, padding, box-shadow, etc) to 0 or none, but to no avail.
2 Answers
You've not defined a height on the Input field, therefore it's smaller than the containing td
td input {
height:20px;
}
Comments
Consider changing your CSS to check for td:hover instead of input:hover.
Instead of:
td input:hover {
background-color: #8d8d8d;
}
td input {
width: 100%;
border: 0;
}
try:
td input {
width: 100%;
border: 0;
}
td:hover, td:hover input {
background-color: #8d8d8d;
}
td { line-height: 100% }. the size of the text in the input doesn't match the height of the table cell. settingline-height: 100%on the cell itself fixes that