Webflow sync, pageviews & more.
NEW

How can I fix the issue of input fields stretching vertically and select boxes stretching horizontally in IE compatibility mode on a Webflow site? The code I tried, including the tags, doesn't seem to work.

TL;DR
  • Add <meta http-equiv="X-UA-Compatible" content="IE=edge"> in Page Settings to disable IE Compatibility Mode.
  • Adjust input/select styles in Webflow: set width/height to auto or percentage, apply display: block or inline-block, and confirm box-sizing is border-box.
  • Add IE-specific fallback CSS using conditional comments in custom code before .
  • Set flex-shrink: 0 and flex-grow: 1 for inputs/selects inside flex containers.
  • Test fixes on real devices or using tools like BrowserStack for accurate results.

You're facing a layout issue in Internet Explorer Compatibility Mode, where input fields and select boxes are not rendering correctly in Webflow. This is due to outdated rendering engines interpreting modern styles differently.

1. Disable IE Compatibility Mode

  • IE Compatibility Mode forces the browser to behave like an older version, breaking modern layouts.
  • Add this meta tag:
    Go to Page Settings, then paste this in the Custom Code → Head section:
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
  • This forces Internet Explorer to use the latest rendering engine.

2. Reset Input and Select Box Styles for IE

  • Internet Explorer may apply fixed widths or heights to form elements.
  • In Webflow Designer, select the problematic input or select box, and do the following:
  • Set Width: Auto or 100% instead of a fixed pixel width.
  • Set Height: Auto, or loosely define it (e.g., 40px) instead of letting IE force a tall height.
  • Apply Display: Block or Inline-Block consistently.
  • Add box-sizing: border-box to ensure borders/padding don’t expand the element:
  • Webflow handles this globally, but confirm you’re not overriding it per-element.

3. Add Fallback CSS for IE (via Embed)

  • You can add conditional comments to target IE-only behavior.
  • In Page Settings → Custom Code (before ), use an IE conditional to patch rendering:
    ``````
  • These styles correct vertical stretching in inputs and horizontal stretching in select elements.

4. Avoid Flex Shrink or Grow on Stretched Elements

  • If a parent uses Flexbox, and child inputs/selects don’t behave properly:
  • Set child elements to flex-shrink: 0 and flex-grow: 1 for controlled sizing.
  • In Webflow, select the input/select and set flex child options under Layout → Flex Child.

5. Test With Real Devices or Emulators

  • Sometimes, browser emulators like IE's Developer Tools in Compatibility Mode don’t reflect real-world rendering.
  • Use services like BrowserStack or a real device to confirm the fix is effective.

Summary

To fix input and select element stretching in IE Compatibility Mode: force modern rendering using the meta tag, reset problematic styles, and use fallback CSS for IE via conditional comments. Avoid depending on modern CSS behaviors that IE misinterprets.

Rate this answer

Other Webflow Questions