0

I've created my website, but now at a mobile device (my Samsung Galaxy S4 Android phone), the contact form ignores the set width for the fields.

Part of the HTML code:

<tr>
   <td valign="top">
       <label for="name">Name *</label>
   </td>
   <td>
       <input type="text" name="name" maxlength="50">
   </td>
</tr>

Part of the CSS code:

input, textarea {
 border-radius: 9px;
 border-style: solid;
 border-width: 1px;
 border-color: #000000;
 padding-left: 10px;
 width: 450px;
}

Now everything exept for the width** works just fine, and everything including the width works on my laptop (using google chrome). My question: why does my android device (using Chrome for Android) not work?

** the width is too big for the container, which makes the submit button disappear outside of the container as well, this is because the button's float is set to right

  • Possible similar question here: http://stackoverflow.com/questions/1480588/input-size-vs-width – Kivak Wolf May 09 '14 at 15:46
  • That's actually not similar at all, there's nothing about phones and other mobile devices there. – Rob van den Bogaert May 09 '14 at 16:01
  • Correct, but this may not be a device issue - rather, a browser issue. As the answer in the link says, "The css style will override the size attribute in browsers that support CSS and make the field the correct width, and for those that don't, it will fall back to the specified number of characters." I'm just pointing you in that direction so you can test that hypothesis in your case. – Kivak Wolf May 09 '14 at 16:59
  • I tested it with adding `size="1"` (and other bigger vallues at first) and still nothing changes in the Android version of google chrome – Rob van den Bogaert May 09 '14 at 17:40

0 Answers0