Use a broadly supported CSS baseline, then add newer styling with feature queries. Check support for the exact property and value in the browser versions that matter to your audience, and test the rendered result: a browser accepting CSS does not guarantee that it implements the feature correctly.
Build a usable baseline before adding enhancements
Progressive enhancement keeps a page functional when a browser lacks a newer CSS feature. Write the essential layout and presentation first using CSS your target browsers support; layer optional enhancements on top. MDN recommends this approach for older browsers: Supporting older browsers.
For example, a simple block layout can remain the fallback while browsers that support grid receive a two-column arrangement:
.card {
display: block;
padding: 1rem;
}
@supports (display: grid) {
.card-list {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem;
}
}
The fallback should preserve the content and core interaction, even if spacing or layout is less refined. Put the enhancement inside the conditional block rather than making the entire experience depend on it.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
Use @supports for CSS capability checks
The @supports at-rule evaluates whether a browser considers a CSS declaration or selector syntax valid. A condition can check a property-value pair, combine checks using and or or, or negate one with not. Selector support can be queried with selector(). See MDN’s @supports CSS at-rule reference and guide to using feature queries.
Check the exact value you plan to use, not only the property name. A browser may recognize a familiar property while lacking support for a newer value. Feature queries are often a good way to provide fallback styles and enhancements in one stylesheet; MDN contributors describe them as “a useful alternative to fallback declarations, and enable writing code once that can eventually be supported everywhere.”
Rank #2
For example, the query above tests display: grid. If a design depends on a more specific value or selector syntax, write a condition for that capability instead of assuming that support for a related feature implies support for it.
Choose @media for environment, not feature support
Use @media when styling should depend on an environmental condition, such as viewport characteristics. Use @supports when the condition is whether a CSS feature is supported. These answer different questions: a viewport query does not establish that a browser implements a particular CSS feature, and a feature query does not describe the viewport. MDN explains the distinction in its feature-query guide.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteRank #3
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
Know what feature detection cannot tell you
A positive @supports result means the browser accepts the tested declaration or selector syntax. It does not prove the browser renders the feature as intended, implements every part of it, or is free of bugs. A browser can accept a feature that has a partial implementation or a behavior that differs from what your design requires.
If correctness depends on a particular rendering behavior, verify that behavior in the actual browser and version combinations important to your site. Do not treat a support query as a visual regression test or as proof of specification compliance. For cases where a CSS capability check in JavaScript is more useful, MDN documents the related CSS.supports() static method.
Rank #4
Check compatibility and test the browsers your site needs
- Identify the exact CSS feature. Include the property, value, or selector syntax the design relies on.
- Review current compatibility information. Check the relevant browser versions in the feature’s compatibility data rather than relying on a general statement that a browser supports CSS feature queries. MDN’s older-browser guidance points readers to compatibility tables and online testing tools.
- Keep the fallback independently usable. Confirm that core content and functionality remain accessible without the enhancement.
- Test the result in relevant browsers. Check layout, overflow, text, focus, and interactive states where the feature affects them. Use real-browser testing, including online tools when older environments need coverage.
There is no single browser-version matrix that answers every CSS compatibility question: support is feature-specific and can change. Recheck the current data for the precise feature and versions you target rather than generalizing from an old table or a different CSS feature.
Why browser-name hacks are usually the wrong first move
A browser name or user-agent string is an indirect proxy for capability. Different versions of one browser can behave differently, and multiple browsers may support the same feature. Prefer checking the needed capability and retaining a fallback. MDN’s discussion of browser detection using the user agent string recommends feature detection; if a real implementation difference remains despite support, isolate and test that behavior rather than building a stylesheet around broad browser labels.
Best Value
Troubleshoot a CSS difference
- The enhancement never appears: confirm that the tested declaration or selector is exactly the one in use, then check support for its specific value or syntax in the target browser.
- The query passes but the page still looks wrong: acceptance is not a correctness guarantee. Test the actual behavior and add a narrowly scoped fallback or adjustment for the verified difference.
- The fallback is also broken: move essential styles outside the feature query and make sure they do not rely on the unsupported feature.
- A media query does not solve the problem: confirm whether the condition is truly environmental. If the issue is CSS feature support, use a feature query or a fallback instead.
- A browser-specific rule fixes one version but breaks another: replace broad user-agent targeting with capability detection where possible, and retest the relevant version combinations.
Or skip the browser setup
For a screenshot of a page while checking a CSS change, ScreenshotNeo can return an image or PDF from one request. Its screenshot API accepts a URL and can capture PNG, JPEG, WebP, or PDF; it is a visual capture tool, not a replacement for checking behavior across actual browser/version combinations. Cookie and consent banners, newsletter popups, and chat widgets are removed before capture, with those steps individually configurable. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents.
Example cURL request (replace the URL with the page you want to capture):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. ScreenshotNeo offers 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000 screenshots. Learn about ScreenshotNeo or sign up for the free plan.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




