Anyone know how to indent the place where the cursor begins in a text box? I'm having a hard time getting it to work without affecting other things in IE...

I have a text box with a background image (for a google search) and the textbox contains a 15 px image to the far left with the google 'G' in it. I want the cursor for the text box to appear to the right of this, so I used the text-indent : 17px on the style for that textbox. It works, but it creates a space between the TD that holds my drop down and the TD that holds my search box. This happens in in IE only. Firefox is ok.

I checked my doctype, 'cause I thought it could be box-model related, but I'm using XHTML strict in standards mode. My CSS + HTML is below. Please excuse the layout with tables :-/



div#portal_header_navigation {
  background-image:url(/images/Header.gif);
  position:absolute;
  width:1000px;
  height:115px;
  z-index:1;
  left: 0px;
  top: 0px;
}

.portal_search_field_web {
  vertical-align:top;
  padding:0px;
  margin:0px;
  border: 1px black solid;
  font-size:10px;
  height:16px;
  width:120px;
  text-indent:20px;
  background-image: url(/images/GoogleSearch.gif);
  background-repeat: no-repeat;
}




<div id="portal_header_navigation">
<table width="296" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td
      width="56"
      id="portal_search_text"
      align="right"
    >
      <img
        src="/includes/images/portal/Search.gif"
        border="0"
      >
    </td>
    <td width="65">
      <select
        name="selSearch"
        id="selSearch"
        onchange="checkWebSearch(this);"
        class="portal_search_select"
      >
        <option
          value="school"
          selected="selected"
        >
          School
        </option>
        <option
          value="people"
        >
          People
        </option>
        <option
          value="web"
        >
          Web
        </option>
      </select>
    </td>

    <td width="175">
      <input
        type="text"
        id="txtSearch"
        name="txtSearch"
        class="portal_search_input"
      />
      <input
        type="submit"
        value="GO!"
        id="portal_search_button"
      />
    </td>
  </tr>
</table>
</div>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to