0

We are building a form to closely duplicate a printed version that requires precise placement of the input text fields in a layer over graphic elements to match the printed form. Everything was working fine until the client asked for text align right. Testing showed that IE9-10 do not add the letter spacing to the right of the right-most letter while other browsers do. Unfortunately, this causes the input field content to line up in a different position. The CSS is adjusted to make the numbers line up over the boxes underneath, however, in IE9-10 (and likely earlier versions) the numbers are shifted to the right (no spacing). Taking out the letter spacing fixes the problem but we need it to match the box positions.

http://siteground164.com/~contexed/design1/index.php/education/techmark/decision-form-2n

  • I'm not sure this is exactly what you're looking for, but custom IE9/10 styles can be set using @media screen and (min-width:0\0) {/* Enter CSS here */ } and custom dropping in the tags you need. Not that this will return a Chromium warning – BTC Oct 16 '13 at 19:03
  • In earlier versions, you'll probably need to set up responsive style sheets, like so: http://css-tricks.com/how-to-create-an-ie-only-stylesheet/ – BTC Oct 16 '13 at 19:04
  • Thanks JCG, that does work. I was hoping to find a solution without singling out browsers. Maybe there is none? – user2887678 Oct 17 '13 at 17:40

1 Answers1

0

What you are looking for are responsive stylesheets, specifically:

 @media screen and (min-width:0\0) {/* Enter CSS here */ }

or conditional style sheets, as described here: http://css-tricks.com/how-to-create-an-ie-only-stylesheet/

These are your best bet. Unfortunately, in this case, as in many other cases, there is not typically a good solution to cross-browser CSS that does not imply a browser specific sheet, block, or property. This is by nature of the design of the different browsers (hence the need for pre-IE 10 conditions, responsive stylesheets and the -moz, -webkit, -khtml, etc. declarations before many properties).

BTC
  • 3,802
  • 5
  • 26
  • 39