October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Find and Fix Visual Bugs on Websites

Find the element behind a visual defect with DevTools, verify a targeted fix under the original conditions, and use Playwright screenshot comparisons to watch for regressions.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To find a visual bug, reproduce it under the same browser, viewport, zoom, and page state, then use browser DevTools to identify the affected element and inspect its live styles and layout. Fix the underlying rule or loading behavior, verify the result under the original conditions, and add a screenshot comparison if you need to catch regressions.

1. Reproduce the bug before changing code

A visual defect can depend on more than the page URL. Capture the conditions that make it appear so you can distinguish a real fix from a change that only works in a different state.

As an Amazon Associate I earn from qualifying purchases.

  • Record the route or URL, browser and version, viewport width and height, and zoom level.
  • Note the action that precedes the defect, such as opening a menu, submitting a form, or scrolling.
  • Establish when it occurs: on initial load, after images or fonts load, after an interaction, or only after scrolling.
  • Compare the intended appearance with the actual page under those same conditions. A screenshot is useful for recording the symptom, but it cannot show which live CSS rule produced it.

Keep the original reproduction conditions available while debugging. Otherwise, a viewport or timing change can make the symptom disappear without fixing its cause.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Find the element and inspect its live styles

Start with browser developer tools rather than guessing from the page image. In Chrome, open DevTools and use Inspect mode to point at the part of the page that looks wrong. Chrome highlights the element and shows it in the DOM; its tooltip can display dimensions, colors, font properties, padding, and margins. See Chrome’s Inspect documentation. MDN explains that developer tools expose the runtime HTML and CSS applied to an element in its developer tools guide.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Inspect the box and its surroundings

With the likely element selected, compare its dimensions and spacing with its parent and nearby elements. Check its width and height, margin, padding, text and background colors, and the active CSS rules. Inspect the layout context as well: a child may be correctly styled but positioned unexpectedly because of a parent rule or a neighboring element.

Test a suspected rule in DevTools

Temporarily change or disable a relevant declaration in the Styles pane. If the visible symptom changes as expected, you have evidence that the rule is involved. This is a diagnostic experiment, not the permanent fix: identify the source declaration and make the appropriate change in your project code.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

3. Diagnose movement as it happens

If a page looks correct at first and then jumps, a still screenshot may miss the important event. In Chrome DevTools, open the Rendering panel, enable Layout Shift Regions, and refresh or repeat the interaction. The highlighted regions can help locate what moved. Chrome also documents Layer Borders and other rendering overlays in its Rendering performance guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the highlighted area to narrow down the affected content, then investigate what changes its size or position during the load or interaction. The overlay helps locate movement; it does not identify the source-code cause by itself.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

4. Fix the cause, then retest the same conditions

Make a targeted edit based on what inspection shows. Possible causes include an incorrect CSS constraint or spacing rule, a responsive breakpoint that does not suit the viewport, an unexpected style override, or an image or font loading behavior that changes layout. These are possibilities to investigate, not diagnoses of any particular site.

  1. Make the source-code change that addresses the cause you observed.
  2. Reload the page under the original browser, viewport, zoom, and interaction conditions.
  3. Check the affected area at other viewport sizes and in other browsers relevant to your audience.
  4. For a moving defect, repeat the load or interaction and watch for the shift rather than checking only the final frame.

5. Add a screenshot regression check with Playwright

For a defect that could return, Playwright Test can compare a page screenshot with a saved reference using expect(page).toHaveScreenshot(). On the initial run, Playwright creates reference screenshots; later runs compare the current rendering with those references. Review the image diff before updating a baseline, so an unintended change is not accepted as the new expected result. See Playwright’s visual comparisons documentation.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

A minimal test, assuming Playwright Test is installed and configured in the project, can look like this:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import { test, expect } from '@playwright/test';

test('home page visual baseline', async ({ page }) => {
  await page.goto('http://localhost:3000');
  await expect(page).toHaveScreenshot('home-page.png');
});

Run it with the project’s Playwright Test command, for example npx playwright test. The first run establishes the reference; inspect the generated image and subsequent diffs before accepting a baseline change.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Control volatility without hiding real defects

Playwright screenshot options include pixel-difference tolerance and a stylesheet for suppressing dynamic or volatile content. These can help when content changes unpredictably between runs. Apply them narrowly: hiding or tolerating the very element that is broken can make a test pass while the user-facing bug remains.

Keep the rendering environment consistent

Playwright notes that screenshots can vary with the host operating system, browser version, settings, hardware, power source, and headless mode. Match operating system and browser versions for visual regression runs where possible, as described in its best-practices guide. A pixel difference shows that the render changed; assess whether that change is meaningful and unwanted before treating it as a bug.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

6. Debug automated visual failures

When a screenshot test fails in automation, inspect the test sequence and browser state instead of inferring the cause from the final image alone.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Playwright Inspector: step through the test, pick or live-edit locators, and review actionability logs. See Playwright debugging.
  • Trace Viewer: Playwright recommends it for CI failures; it shows the test action timeline and DOM snapshots. See the best-practices guide.
  • UI Mode: provides access to browser DevTools, network activity, DOM snapshots, and expected-versus-actual screenshot comparisons. Its documentation is at Playwright UI Mode; because this is the next documentation path, details may change.

Or skip the browser setup

For a screenshot through an API, ScreenshotNeo accepts a URL in one GET request and returns an image or PDF. The request below saves a WebP screenshot; see the ScreenshotNeo API documentation for request options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers say which page verdict occurred and whether it was billed. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents using Claude, Cursor, or another MCP client. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots.

Learn about ScreenshotNeo, or sign up for 1,000 free screenshots a month with no card.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.