Jak-S
03-07-2005, 01:14 PM
Hi,
I have some input fields that are displayed down a table column in individual cells, however in IE im getting a 1px gap above and below all of my text inputs. This wouldnt matter if they stayed white, however im using the onFocus attribute to change the background colour and there is this stupid gap between all of my input fields (it works perfectly in FireFox).
Can anyone tell me whats wrong?
This is the table:
<table width="125" border="0" cellspacing="0" cellpadding="0" id="sizes_#sections_id#">
<!-- this row is repeated for a number of records --->
<tr>
<td><input type="text" class="listBoxText" name="sizes_#currentSectionID#_#sizes_id#" value="#sizes_name#" style="width: 125px;" onFocus="this.className='listBoxTextHighlight';" onBlur="this.className='listBoxText'"></td>
</tr>
<!-- end of row --->
</table>
And this is the applicable CSS:
input.listBoxText {
border: none;
padding: 2px 3px 3px 3px;
border-bottom: 1px solid #EAEAEA;
height: 20px;
}
input.listBoxTextHighlight {
border: none;
padding: 2px 3px 3px 3px;
background-color: #F2F8F9;
border-bottom: 1px solid #EAEAEA;
height: 20px;
}
I have some input fields that are displayed down a table column in individual cells, however in IE im getting a 1px gap above and below all of my text inputs. This wouldnt matter if they stayed white, however im using the onFocus attribute to change the background colour and there is this stupid gap between all of my input fields (it works perfectly in FireFox).
Can anyone tell me whats wrong?
This is the table:
<table width="125" border="0" cellspacing="0" cellpadding="0" id="sizes_#sections_id#">
<!-- this row is repeated for a number of records --->
<tr>
<td><input type="text" class="listBoxText" name="sizes_#currentSectionID#_#sizes_id#" value="#sizes_name#" style="width: 125px;" onFocus="this.className='listBoxTextHighlight';" onBlur="this.className='listBoxText'"></td>
</tr>
<!-- end of row --->
</table>
And this is the applicable CSS:
input.listBoxText {
border: none;
padding: 2px 3px 3px 3px;
border-bottom: 1px solid #EAEAEA;
height: 20px;
}
input.listBoxTextHighlight {
border: none;
padding: 2px 3px 3px 3px;
background-color: #F2F8F9;
border-bottom: 1px solid #EAEAEA;
height: 20px;
}