Search code examples
cssxforms

need same font size for upper and lower case


Html text box should have same font size for both upper and lower case chars.

For example, i have a textbox length of 5 using below css class="field-width-5"

.field-width-5 { width:5px }


<td class="field-width-5">
      <xforms:input bind="alternate-address-1-postal-code" xxforms:maxlength="5" id="alternate-address-1-postal-code-id"/>
</td>

When i enter upper case words such as QWDO, it occupies more space and it exceeds the width of 5px. Is there any font can be applied to over come this issue.


Solution

  • You want a fixed-width font like Courier New on Windows. Generically this is the monospace font family in CSS (works on every OS.)