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

Build a website banner as a responsive component, not a single fixed-size image. Let its container and image fit the available width, use srcset and sizes to offer efficient resolutions, and switch to a separately composed mobile image with <picture> when a desktop crop cannot work on a narrow screen. Keep essential text and calls to action as live HTML where possible, reserve image space to prevent layout shifts, and test the result at narrow widths and browser zoom.

What makes a website banner responsive?

A responsive banner adapts its dimensions, image choice, and content layout to the space available. A desktop banner should not simply be shrunk until its headline is unreadable or its subject disappears. Instead, separate three decisions: how wide the banner can be, which image composition suits that width, and how the text and controls reflow.

  • Fluid sizing prevents the banner from overflowing its containing column.
  • Resolution switching serves an appropriately sized version of the same composition.
  • Art direction switches to a different crop or composition when the subject needs to move or the aspect ratio changes substantially.
  • Responsive content lets live text, buttons, and other elements adapt rather than remain trapped in a bitmap.

MDN’s responsive design guidance describes pages adapting to device characteristics and recommends fluid images that do not exceed their container width: MDN responsive design.

Plan the content and safe area first

Before exporting images, identify the banner’s essential content: usually a short headline, a supporting detail if necessary, and a call to action. Keep those elements in HTML when possible. Text in HTML can wrap, be translated, be selected, and remain available to assistive technology; text baked into an image cannot reflow and may be cut off by a mobile crop.

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

Choose a safe area in the artwork for any visual that must remain visible, such as a product, logo, or focal subject. Check that it remains clear in the narrowest intended composition. If the wide crop and the phone crop require different subject placement, make a dedicated mobile asset instead of forcing one image to serve both.

Make the banner container and image fluid

Start with a container that can use the width of its parent or viewport rather than a fixed page width. The image should shrink within that container and preserve its proportions. This baseline suits a banner whose crop can stay the same at all widths:

.banner {
  width: 100%;
  overflow: hidden;
}

.banner img {
  display: block;
  max-width: 100%;
  height: auto;
}

For example, the markup can be as simple as:

<div class="banner">
  <img
    src="banner-wide.jpg"
    width="1600"
    height="500"
    alt="Trail shoes on a mountain path">
</div>

max-width: 100% prevents the image from exceeding the banner’s available width, while height: auto preserves the source aspect ratio. A fixed-width page can create horizontal scrolling on narrow screens and unused space on wide ones, so make the surrounding layout fluid as well. W3C’s C37 technique describes fitting images to available space without horizontal scrolling: W3C Technique C37.

Choose between resolution switching and a new crop

Use srcset and sizes for the same composition

When the image composition works at all screen widths but its rendered size changes, provide multiple files of that image at different intrinsic widths. The srcset list describes the available candidates; sizes tells the browser the expected rendered slot width. The browser uses those hints to choose an image candidate appropriate to the layout and display.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<img
  srcset="banner-480.jpg 480w, banner-800.jpg 800w, banner-1280.jpg 1280w"
  sizes="(width <= 600px) 480px, (width <= 1000px) 800px, 1280px"
  src="banner-1280.jpg"
  width="1280"
  height="360"
  alt="Summer sale: save on outdoor gear">

Make the values in sizes reflect the actual slot in your design. The example assumes a 480-pixel slot at widths up to 600 pixels, an 800-pixel slot up to 1000 pixels, and a 1280-pixel slot beyond that. If the banner sits in a narrower page column, adjust the sizes accordingly; otherwise the browser may select an unnecessarily large file. The fallback src remains useful for browsers or contexts that do not use the candidate list.

MDN explains that srcset and sizes supply source images and hints that help the browser select one: MDN responsive images.

#1 Best Overall
Sale
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

Use <picture> when the composition must change

If a wide image places the subject too far from the headline, or a landscape crop becomes cramped on a phone, use art direction: provide a different crop for the narrow layout. The <source> elements set the media conditions and the <img> supplies the fallback and alternative text.

<picture>
  <source media="(width < 700px)" srcset="banner-mobile-800x1000.jpg">
  <source media="(width >= 700px)" srcset="banner-wide-1600x500.jpg">
  <img
    src="banner-wide-1600x500.jpg"
    width="1600"
    height="500"
    alt="Trail shoes on a mountain path">
</picture>

Use media conditions on <source> to choose a composition. Use srcset and sizes when the browser should choose among resolutions of that composition. They solve different problems and can be combined when each crop has several size variants. Include an <img> with src and alt inside the picture element; it is the required fallback and the place for the image’s alternative text.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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

Reserve space and keep the design readable while loading

Set intrinsic width and height on the image to match the fallback file’s proportions. Browsers can use those dimensions to reserve the image’s aspect-ratio space before the file arrives, reducing layout shifts. If you provide different aspect ratios for art-directed sources, plan the layout deliberately and test the transition: the fallback dimensions describe the fallback image, not an automatic guarantee that every crop has identical proportions. MDN documents how image dimensions help reserve space: MDN <img> reference.

For a CSS background image, explicitly size the containing block and choose a background color that keeps any overlaid text readable before the image loads. A background is useful for decorative or layered treatments, but it does not provide the same native alternative-text and responsive-source behavior as an inline <img>. Do not put essential text only in a background image.

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.

Test screen sizes, zoom, and real content

Test the banner at the extremes the layout is meant to support, not just at one desktop and one phone preset. W3C reflow guidance uses a 320 CSS-pixel viewport as a representative narrow condition; Technique C37 discusses checking up to 400% zoom. These are test conditions, not predictions of how people use devices.

  • At a narrow phone width, verify there is no horizontal scrolling and the headline and call to action remain legible and reachable.
  • At tablet and typical desktop widths, check that the image and text have enough room and that the selected crop is appropriate.
  • At a very wide width, ensure the banner does not become awkwardly stretched or leave content stranded far apart.
  • At browser zoom, confirm content reflows instead of being clipped or requiring horizontal scrolling.
  • Use the longest realistic headline and translated text you expect to support; short placeholder copy can hide wrapping problems.
  • Check that the focal subject, logo, and any image-baked lettering stay inside the safe area for each crop.

W3C’s reflow technique explains the 320 CSS-pixel condition: W3C Technique C32. The zoom check and image-fitting procedure are covered in W3C Technique C37.

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

Pick the simplest approach that preserves the design

Approach Use it when Trade-off
One fluid image The same crop remains clear at every width. Simplest to maintain, but a subject or text may become too small or poorly placed.
Resolution variants with srcset and sizes The composition stays the same while the rendered slot changes. Requires exporting and maintaining multiple sizes; can avoid sending a needlessly large image to a small slot.
Art-directed crops with <picture> The narrow layout needs a different crop, subject position, or aspect ratio. Preserves composition better, but requires designing and maintaining separate assets.
Live HTML text over an image Headlines and actions need to wrap, localize, or remain accessible. Needs responsive layout and contrast treatment over the artwork.
Text baked into artwork The banner is a fixed visual treatment and its wording does not need to reflow. Needs crop-specific versions and careful legibility checks; text is not live page text.
Inline <img> The image conveys content and needs alternative text or responsive source selection. Requires image markup and a meaningful alternative text when the image adds information.
CSS background The image is decorative or part of a layered presentation. Requires explicit sizing and a readable fallback; background imagery does not supply native alternative text.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common banner problems

The image overflows on a phone

Check that the image has max-width: 100% and that its parent is not wider than the viewport. Look for fixed widths on the banner, page wrapper, or adjacent content. A fluid image cannot fix an overflowing fixed-width parent.

The headline or subject is cropped

First determine whether the image itself is being cropped by a fixed-height container or whether the chosen source has the wrong composition. If the desktop crop does not work at narrow widths, provide a mobile crop with <picture>. Keep essential copy in HTML and place visual elements inside the crop-safe area.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • 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

The browser downloads an image that is too large

Confirm that srcset lists the actual intrinsic pixel widths of the files and that sizes describes the rendered slot, not merely the viewport breakpoint. If the banner is 600 CSS pixels wide in a two-column desktop layout, a sizes value of 1280 pixels for that condition can give the browser a misleading hint.

The page jumps when the image appears

Add accurate intrinsic width and height values to the fallback image and avoid changing its layout dimensions after download. For art-directed sources with different proportions, test the layout at the breakpoint and decide whether the container should change aspect ratio or use a consistent crop strategy.

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

The text is unreadable over the image

Do not rely on the image alone for contrast. Use a deliberate overlay or background treatment behind live text, choose a crop with calm space for copy, or move the text outside the image. Check the actual image variants because a treatment that works over one crop may fail over another.

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.

Or skip the browser setup

If you need to inspect the rendered banner as an image while checking responsive variants, a screenshot API can capture a URL without manually opening a browser. ScreenshotNeo is a website screenshot API and MCP server from ScreenshotNeo; its API documentation is at ScreenshotNeo API docs.

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

With its supported defaults, one GET request returns a screenshot or PDF. For banner checks, set the capture options described in the docs to match the viewport and full-page or element capture you need. ScreenshotNeo’s clean-shot options accept consent banners like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients.

The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo’s free plan.

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

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.