Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Capture a Webpage in Firefox at a Specific Viewport Size

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Capturing a webpage at a specific viewport size lets you create screenshots that match a target device or design breakpoint — useful for responsive design checks, client deliverables, or documentation. This guide shows you how to do it in Firefox using the built-in Responsive Design Mode, which simulates any screen size and captures the page exactly as it would appear on that viewport.

What You'll Need

  • Firefox browser (current version, desktop edition)
  • The webpage you want to capture (open in a tab)
  • Optional: a specific viewport width and height in pixels (e.g., 375×812 for iPhone X)

Step-by-Step

  1. Open the page you want to capture in a Firefox tab. Make sure the page has fully loaded, including images and fonts.
  2. Open Responsive Design Mode by pressing Ctrl+Shift+M (Windows/Linux) or Cmd+Opt+M (Mac). Alternatively, click the three-line menu (☰) → More tools → Responsive Design Mode.
  3. Set the viewport size. In the toolbar that appears at the top of the page, you'll see two number fields: width and height. Click on each and type your desired pixel dimensions. For example, enter 375 for width and 812 for height. Press Enter after typing each.
  4. Adjust device pixel ratio (if needed). Next to the size fields, there's a dropdown for device pixel ratio (DPR). For standard desktop captures, leave it at 1. For mobile screenshots, you may want to set it to 2 or 3 to match high-DPI displays. The screenshot will be captured at this ratio, so a 375×812 viewport at DPR 2 will produce a 750×1624 image.
  5. Optionally rotate the viewport using the rotate icon (or press R) to capture in landscape orientation.
  6. Take the screenshot. Right-click anywhere on the page and select Take Screenshot. A screenshot toolbar will appear at the top right. Choose Save full page to capture the entire scrollable page, or Save visible to capture only the current viewport area. You can also drag to select a custom region.
  7. Download the image. Click the download icon (or press Ctrl+Shift+S / Cmd+Shift+S) to save the screenshot. Firefox will save it as a PNG file to your default Downloads folder.
  8. Exit Responsive Design Mode by pressing Ctrl+Shift+M again or clicking the X in the toolbar.

Common Mistakes

  • Forgetting to set the DPR — if you capture a mobile viewport at DPR 1, the image will be half the size you expect on a Retina screen.
  • Not waiting for the page to reload after changing the viewport size. Some pages dynamically resize elements, but others need a refresh to apply media queries correctly.
  • Using the browser's regular screenshot tool (e.g., Take Screenshot from the address bar) while in Responsive Design Mode — that captures the whole browser window, not the simulated viewport.
  • Typing the size in the wrong field — width is the first field, height the second. Swapping them will produce a portrait screenshot when you wanted landscape.
  • Ignoring the scrollbar — in Responsive Design Mode, the scrollbar may take up space inside the viewport, affecting the actual layout width. You can hide it by checking the “Hide scrollbars” option in the toolbar's three-dot menu.

Tips

  • Use presets: The device dropdown (e.g., iPhone, iPad, Pixel) automatically sets common viewport sizes and DPR. You can then tweak the numbers if needed.
  • Save custom sizes: Once you type a size, it appears in the device dropdown's “Custom” section for future use.
  • Capture full page: For long pages, the “Save full page” option stitches together multiple screenshots seamlessly. It may take a few seconds for very long pages.
  • Check the image dimensions: After saving, verify the file's pixel size matches your expected width × height (multiplied by DPR). If not, adjust the DPR or viewport and retake.
  • Use keyboard shortcuts: R rotates, Ctrl+Shift+M toggles Responsive Design Mode, and Ctrl+Shift+S saves the screenshot.

Troubleshooting

  • Screenshot is blank or black: Some sites block screenshots due to DRM or canvas elements. Try disabling hardware acceleration in Firefox settings (Options → General → Performance → uncheck “Use recommended performance settings” and uncheck “Use hardware acceleration when available”), then restart Firefox.
  • Viewport size doesn't match what you typed: Ensure you pressed Enter after typing the number. Also, check if the browser zoom is not at 100% — reset it with Ctrl+0 (Cmd+0).
  • Full page capture cuts off at a certain height: Firefox has a maximum screenshot height (usually around 16,000 pixels). For extremely long pages, you'll need to capture in sections and stitch them manually.
  • The page doesn't respond to the viewport change: Some sites use JavaScript that only runs on initial load. Refresh the page (Ctrl+R) after setting the viewport size.
  • Can't find the screenshot file: Firefox saves screenshots to the Downloads folder by default. If you don't see it, check the downloads panel (Ctrl+J) for the file location.
  • Responsive Design Mode won't open: If the shortcut doesn't work, use the menu path: ☰ → More tools → Responsive Design Mode. If that fails, restart Firefox.

Frequently Asked Questions

Does the screenshot include the browser's own UI?

No. Responsive Design Mode simulates only the viewport, so the screenshot contains just the webpage content — no address bar, tabs, or toolbars.

Can I capture a specific element instead of the whole page?

Yes. In Responsive Design Mode, right-click on the element and choose Take Screenshot. Then drag to select the element's bounding box, or use the “Save visible” option to capture exactly what's on screen.

What file format is the screenshot saved in?

Firefox saves screenshots as PNG files. This format is lossless and works well for web graphics.

Can I set a custom viewport size that's not in the device list?

Absolutely. Just type any width and height in the size fields. Firefox will remember it as a custom device for future sessions.

Does the screenshot reflect CSS media queries correctly?

Yes. Responsive Design Mode emulates the viewport width and height, so media queries based on those dimensions will apply as they would on a real device.

Is there a way to capture screenshots automatically at multiple sizes?

Not built-in. You'll need to manually set each size and capture. For automated workflows, consider using browser extensions or command-line tools like Puppeteer.