A website can look polished on a desktop monitor but become difficult to use on a phone or tablet. Text may overflow its container, images may stretch, navigation links may disappear, and cards that sit neatly in columns on desktop may become cramped or overlap on smaller screens. These problems usually indicate that the interface has not been designed or tested to adapt properly to different viewport sizes.
The main reason a website interface looks broken on different screen sizes is that its layout depends on fixed dimensions, inflexible components, or assumptions about how much space is available. Responsive web design addresses these issues by allowing content, images, navigation, and page layouts to adjust to the available viewport. The goal is not simply to shrink a desktop design; it is to preserve the content and functionality while changing how they are presented.
According to MDN’s responsive design guide, responsive design is an approach that enables websites to adapt to different device and viewport sizes. Understanding the common causes of layout failures makes it easier to identify and fix them systematically.
Fixed-Width Layouts Cause Horizontal Scrolling
One of the most common responsive UI problems occurs when developers assign fixed widths to containers, cards, or page sections. A layout designed around a desktop width may not fit inside a mobile viewport.
For example, a content container set to width: 1200px cannot comfortably fit inside a phone screen that is only a few hundred CSS pixels wide. The browser may introduce horizontal scrolling, cut off content, or make the page appear zoomed out.
How to fix it:
Use flexible widths and maximum-width constraints instead of relying on fixed dimensions for the entire layout.
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 16px;
}
This allows the container to use the available screen width without growing beyond the intended maximum. Also check child elements: a flexible parent cannot prevent overflow if one of its children still has an unnecessarily large fixed width.
Missing or Incorrect Viewport Settings
A website may contain responsive CSS but still display incorrectly on mobile devices if its viewport is not configured properly. Without the appropriate viewport declaration, some mobile browsers may use a wider virtual layout viewport and scale the page down to fit the screen.
That can make text appear unusually small and media queries behave differently from what developers expect.
How to fix it:
Include the standard viewport declaration in the document’s HTML head:
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
The width=device-width setting tells the browser to use the device’s CSS viewport width, while initial-scale=1 sets the initial zoom level. This gives responsive CSS a more appropriate starting point on mobile devices.
The viewport setting does not make a website responsive by itself. Developers still need flexible layouts, suitable breakpoints, and components that can adapt to narrower screens.
CSS Grid and Flexbox Items Overflow Their Containers

CSS Grid and Flexbox make it easier to create flexible layouts, but their default sizing behavior can still produce unexpected results.
A common example occurs when a grid contains cards with long text, large images, or elements that cannot shrink enough. A grid column may become wider than expected, pushing other content outside the viewport. Flex items can experience a similar problem when their minimum content size prevents them from shrinking.
How to fix it:
For a responsive card layout, use flexible grid columns:
.card-grid {
display: grid;
grid-template-columns: repeat(
auto-fit,
minmax(min(100%, 240px), 1fr)
);
gap: 24px;
}
This allows the browser to fit as many columns as the available space permits while keeping cards from becoming narrower than the defined minimum when space allows.
For flex layouts, check whether a child needs min-width: 0:
.flex-child {
min-width: 0;
}
This can allow text and other content to shrink within a flex item instead of forcing the entire row wider. It is important to inspect the actual overflowing element rather than applying overflow rules to the whole page as a quick workaround.
Let’s Talk About Your Business
Not sure which approach is right for your business? Get a free consultation with our team.
Images and Videos Break the Mobile Layout
Large images, banners, product photos, and embedded videos can create horizontal scrolling when their dimensions exceed the width of their containers. This often happens when media elements use fixed pixel widths or when developers forget to account for their natural dimensions.
Images can also look distorted when their width and height are forced into proportions that do not match the original image.
How to fix it:
Use responsive image rules that limit media to the available space:
img,
video {
max-width: 100%;
height: auto;
}
This allows an image or video to shrink when its container becomes narrower while preserving its natural aspect ratio in typical cases.
For image cards that need a consistent visual frame, use object-fit deliberately:
.product-image {
width: 100%;
aspect-ratio: 4 / 3;
object-fit: cover;
}
object-fit: cover fills the frame but may crop parts of the image. Use it when cropping is acceptable, not when every part of the image must remain visible. The W3C’s CSS technique for fitting images also explains how max-width and flexible height can help prevent images from introducing horizontal scrolling.
Desktop Navigation Does Not Fit on Smaller Screens
Navigation menus often contain several links, dropdowns, account controls, and search options. A menu that fits across a desktop header may become crowded on a tablet or phone.
When developers simply reduce the spacing or font size, navigation can become difficult to read and operate. In other cases, links wrap onto multiple lines, overlap the logo, or extend beyond the screen.
How to fix it:
Choose a navigation layout that matches the available space. On wider screens, a horizontal menu may work well. At a narrower breakpoint, it can change into a compact menu controlled by a clearly labelled button.
The mobile menu should:
- Keep all important navigation options available.
- Open and close reliably using touch and keyboard input.
- Make the current menu state clear.
- Avoid covering essential content without providing a way to close it.
- Keep links large enough and sufficiently separated for comfortable interaction.
Do not hide important links simply to make the header look cleaner. The navigation structure should change while preserving access to the same essential destinations.
Typography and Spacing Become Uncomfortable on Mobile
Text that looks balanced on a large screen can become oversized, tightly packed, or difficult to read on a phone. Fixed font sizes, excessive margins, and desktop-sized padding can make mobile pages feel cramped.
The opposite problem can also occur: developers reduce every font size to fit more content onto a small screen, leaving headings and buttons too small to use comfortably.
How to fix it:
Use responsive typography and spacing rather than applying arbitrary reductions at every breakpoint.
h1 {
font-size: clamp(2rem, 5vw, 3.5rem);
}
section {
padding: clamp(24px, 5vw, 64px) 16px;
}
The clamp() function sets a minimum, a preferred fluid value, and a maximum. This allows headings and spacing to adapt within defined limits.
Also review line length, line height, and paragraph spacing. If text is difficult to scan on a phone, the solution may be a narrower content measure or a better vertical rhythm rather than simply making the font smaller.
Breakpoints Are Chosen Without Considering the Content
A breakpoint is a CSS condition at which a layout changes to suit a different available viewport size. A common mistake is choosing breakpoints only because a particular phone or tablet has a certain screen width.
The problem is that websites are viewed in resized browser windows, split-screen modes, and zoomed layouts as well as on specific devices. A desktop navigation menu might become crowded before the developer’s chosen mobile breakpoint is reached.
How to fix it:
Choose breakpoints based on where the design starts to fail, not on a list of popular device models. Resize the browser gradually and watch for specific problems: navigation wrapping, cards becoming too narrow, headings breaking awkwardly, or buttons colliding.
For example:
/* Base layout for smaller screens */
.product-grid {
display: grid;
grid-template-columns: 1fr;
gap: 16px;
}
/* Add columns when the content has enough room */
@media (min-width: 700px) {
.product-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (min-width: 1050px) {
.product-grid {
grid-template-columns: repeat(3, 1fr);
}
}
These values are examples, not universal breakpoint standards. The correct values depend on the content, component dimensions, and design requirements.
Forms and Tables Become Difficult to Use
Forms and data tables are particularly vulnerable to responsive layout problems. A desktop form may place several fields side by side, but those fields can become too narrow on mobile. Labels may wrap awkwardly, validation messages may overlap other controls, and submit buttons may become difficult to reach.
Tables create a different challenge because their columns often need more horizontal space than a phone provides.
How to fix it:
For forms, stack related fields when the viewport becomes narrow and make inputs use the available width:
.form-row {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}
.form-row input {
width: 100%;
min-width: 0;
}
@media (max-width: 600px) {
.form-row {
grid-template-columns: 1fr;
}
}
For tables, decide whether the information can be reorganized into stacked records or whether horizontal scrolling is necessary to preserve meaningful column relationships. If a table needs horizontal scrolling, keep that behavior inside the table container instead of making the entire page scroll sideways.
The W3C’s WCAG reflow guidance recognizes that some content, including data tables, may require two-dimensional presentation. The important distinction is that ordinary page content should still reflow without forcing users to scroll horizontally across the whole page.
Buttons and Interactive Elements Become Hard to Reach
Responsive problems are not limited to visual appearance. A button may be visible on a desktop but become clipped, covered by another element, or pushed below an unexpected section on mobile. Dropdowns, tabs, and other interactive controls can also become difficult to operate when their layout is compressed.
When checking these elements, review whether the control remains visible, whether its label fits, and whether it can be activated using touch and keyboard input. If important CTA buttons become difficult to notice or access after the layout changes, review their placement, contrast, size, and visual hierarchy. Read more about Why Do Users Struggle to Find Important Buttons on a Website? Common UI Design Mistakes and How to Fix Them to understand the design mistakes that make important buttons difficult for visitors to find.
How to fix it:
Give interactive elements flexible widths where appropriate, allow labels to wrap when necessary, and avoid positioning important controls outside their content containers. Check sticky headers and fixed bottom bars too: they should not cover buttons or form fields when users scroll.
A useful responsive review should include the visual hierarchy of interactive elements. If a call-to-action becomes difficult to notice after the layout changes, revisit its placement, spacing, and contrast. The related guide on [button visibility and common UI design mistakes] is useful when diagnosing why users overlook important actions even when those buttons technically remain on screen.
How to Find and Fix Responsive UI Problems Step by Step
Changing CSS without identifying the actual cause can create new problems at other screen sizes. A more reliable approach is to reproduce the issue, inspect the responsible element, and test the correction across the layout.
Follow this process:
- Reproduce the problem: Open the page at the screen width where the interface looks broken. Note what is overflowing, overlapping, disappearing, or becoming difficult to use.
- Inspect the affected element: Use browser developer tools to examine its computed width, height, padding, margins, positioning, and parent container. Check whether a fixed width, minimum width, or absolute position is forcing it outside the available space.
- Check the layout rules: Review the relevant CSS Grid, Flexbox, media queries, and viewport settings. Look for child elements that cannot shrink or media that exceeds its container.
- Make a targeted change: Replace unnecessary fixed dimensions with flexible sizing, adjust the grid structure, or introduce a breakpoint where the content genuinely needs a different arrangement.
- Test more than one viewport: Check narrow mobile widths, larger phones, tablets, and desktop windows. Also resize the browser gradually to catch problems between your main test sizes.
- Check actual interactions: Open menus, submit forms, use dropdowns, scroll through long pages, and activate buttons. A layout is not fully responsive if it looks correct but important controls no longer work comfortably.
When correcting alignment or spacing issues, review the whole component rather than adding random margins to individual elements. A consistent spacing system and clear container structure make responsive adjustments easier to maintain. If elements appear uneven, overlap, or lose alignment when the viewport changes, learn How Can I Fix Poor Spacing, Alignment, and Layout Problems in My Website Design? to identify and correct common layout problems.
Conclusion
A website interface usually looks broken on different screen sizes because its layout has been built around assumptions that do not hold on every viewport. Fixed widths, inflexible grid items, oversized media, crowded navigation, unsuitable breakpoints, and rigid typography can all prevent a page from adapting properly.
The solution is to build layouts that respond to available space, not to rely on one desktop arrangement and shrink it for mobile. Use flexible containers, responsive media, content-driven breakpoints, and layouts that reorganize when necessary. Then test the complete experience at different widths, including the behavior of forms, navigation, and interactive controls.
Responsive design is successful when users can access the same essential information and functionality without fighting the layout, regardless of the screen size they use.
FAQs
Why does my website look good on desktop but broken on mobile?
This usually happens because the desktop layout uses fixed widths, large images, rigid columns, or navigation that cannot fit a smaller viewport. Incorrect viewport settings can also affect how the browser displays the page. Check the mobile layout for horizontal overflow, overlapping elements, and components that cannot shrink.
How do I fix horizontal scrolling on a mobile website?
First, identify the element extending beyond the viewport using browser developer tools. Check for fixed widths, large images, long unbroken text, and grid or flex children that cannot shrink. Use flexible widths, max-width: 100% for media, and appropriate min-width: 0 rules where needed. Avoid hiding all overflow on the body without fixing the actual cause.
What is the best way to make a website responsive?
Build layouts with flexible containers, CSS Grid, Flexbox, responsive images, and content-driven media queries. Start with a layout that works at narrow widths, then add columns and other arrangements when the available space supports them. Test navigation, forms, images, and buttons instead of checking appearance alone.
How many breakpoints should a responsive website have?
There is no fixed number of breakpoints that works for every website. The required number depends on the content and where the layout starts to become difficult to use. A simple website may need only a few breakpoints, while a complex dashboard may need more. Choose breakpoints when the design needs to change, not simply to match specific device models.
How can I test whether my website is responsive on all screen sizes?
Use browser developer tools to test different viewport widths and device presets. Resize the browser gradually, inspect any horizontal scrolling, and check whether text, images, menus, forms, and buttons remain usable. Also test on actual phones and tablets when possible, because device testing can reveal touch, browser, and interaction problems that a desktop emulator may not reproduce.
Let’s Figure It Out.
Tell us what you’re working on and we’ll help you identify the right next step.