Skip to content

Screen Size Adaptation

DodaTech 4 min read

title: "Screen Size Adaptation" weight: 15 description: "Learn how to ensure content adapts to different screen sizes: responsive layouts, reflowing content without horizontal scroll, readable font sizes, and maintaining functionality across devices from phones to tablets." date: 2026-06-28 lastmod: 2026-06-28 tags: [accessibility, mobile]


Screen size adaptation ensures content reflows and remains usable across the full range of mobile devices, from small phones (320px width) to large tablets (1024px width), without horizontal scrolling or content loss.

## What You'll Learn

You will design responsive layouts that reflow at all screen sizes, ensure content does not require horizontal scrolling, maintain touch target sizes, and preserve functionality on small screens.

## Why It Matters

Mobile devices range from 320px to 1024px wide. Content that works on an iPhone Pro may break on a small Android phone. Users should not need to scroll horizontally or zoom to read content on any device.

## Real-World Use

A dashboard designed for desktop has a fixed-width sidebar and data table. On a 375px phone, the sidebar takes half the screen and the table requires horizontal scrolling. A responsive redesign stacks the sidebar above the content and makes the table scroll vertically instead.

## Screen Size Workflow

```mermaid
flowchart TD
  A[Content] --> B{Screen size?}
  B -->|< 480px| C[Single column]
  B -->|480-768px| D[Two columns, stacked]
  B -->|768-1024px| E[Multi-column]
  C --> F[Reflow content]
  D --> F
  E --> F
  F --> G[Test all sizes]

Implementing Screen Adaptation

Use responsive design techniques: relative units, media queries, flexible grids, and viewport meta tags.

<!-- Responsive viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Responsive card grid -->
<div class="card-grid">
  <div class="card">Card 1</div>
  <div class="card">Card 2</div>
  <div class="card">Card 3</div>
</div>
/* Responsive grid that adapts to screen size */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 16px;
}

/* Responsive typography */
body {
  font-size: 16px;
  line-height: 1.5;
}

@media (min-width: 768px) {
  body {
    font-size: 18px;
  }
}

/* No horizontal scrolling */
.container {
  max-width: 100%;
  overflow-x: hidden;
  padding: 0 16px;
}

/* Flexible tables for small screens */
@media (max-width: 480px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  td {
    padding: 8px;
    border: none;
  }
}
// Screen size adaptation checker
function checkResponsiveIssues() {
  const width = window.innerWidth;
  const issues = [];

  // Check for horizontal scroll
  if (document.documentElement.scrollWidth > width) {
    issues.push('Horizontal scrolling detected');
  }

  // Check touch targets at this width
  document.querySelectorAll('button, a, input').forEach(el => {
    const rect = el.getBoundingClientRect();
    if (rect.width < 44 || rect.height < 44) {
      issues.push(`Small touch target: ${el.tagName} at ${Math.round(rect.width)}x${Math.round(rect.height)}`);
    }
  });

  return issues;
}

window.addEventListener('resize', () => {
  console.log(`Screen: ${window.innerWidth}x${window.innerHeight}`);
  console.log('Issues:', checkResponsiveIssues());
});

Common Mistakes

  • Using fixed pixel widths instead of relative units
  • Not testing on actual small-screen devices
  • Allowing horizontal scrolling on any device
  • Hiding content on mobile without alternatives
  • Using tables that do not reflow on small screens
  • Not adjusting font sizes for readability on small screens
  • Forgetting about tablet sizes between phone and desktop

Practice and Challenge

Practice 1: Test your site on the smallest device width (320px). Practice 2: Check for horizontal scrolling at any screen size. Practice 3: Verify content is not hidden on mobile. Practice 4: Test a table's readability on a small screen. Practice 5: Check font sizes are readable at 320px width.

Challenge: Create a responsive testing suite that tests a page at 320px, 375px, 414px, 768px, 1024px, and 1440px. For each size, check for: horizontal scrolling, touch target sizes, font readability, content visibility, and functional navigation. Document issues found at each breakpoint.

FAQ

What is the minimum screen width I should support?

320px CSS pixels is the minimum for modern mobile phones.

Should I use frameworks like Bootstrap?

Frameworks help but are not required. CSS Grid and Flexbox make responsive design straightforward.

How do I handle tables on small screens?

Convert tables to stacked card layouts on small screens or use horizontal scrolling within the table container.

What font size is readable on mobile?

16px minimum for body text. Smaller sizes are hard to read on small screens.

Should I hide navigation on mobile?

Hide non-essential items behind a hamburger menu. Keep essential items (search, cart) visible.

How do I test on multiple screen sizes?

Use Chrome DevTools device emulation for initial testing, then test on real devices.

Mini Project

Create a responsive page that adapts to 4 screen sizes (320px, 480px, 768px, 1024px) with: a navigation that changes from hamburger to full menu, a card grid that goes from 1 to 4 columns, a table that reflows to cards, and font sizes that scale appropriately. Test and document the behavior at each size.

What's Next

Mobile Screen Readers covers VoiceOver and TalkBack testing.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro