How to make your website mobile friendly and responsive
A fixed-width layout is built for one screen size, so phones show it shrunken or cut off. To fix it, add a viewport tag, replace fixed pixel widths with flexible ones, and use media queries (or switch to a responsive theme).
A fixed-width layout is a page designed to be one set width, for example 960 or 1200 pixels, no matter what screen opens it. On a desktop monitor that looks fine. On a phone, the browser either shrinks the whole page until the text is tiny, or shows only the left part of it and makes visitors scroll sideways.
This is common on older websites, on sites built from hand-made templates, and on sites where someone pasted in a wide table, banner or embedded block that forces the page to stay wide.
What people see
- The page looks like a miniature copy of the desktop version, and visitors have to pinch and zoom to read it.
- Text and buttons are very small and hard to tap.
- The page scrolls left and right as well as up and down.
- Columns and sidebars stay side by side instead of stacking into one column.
- Images or menus run off the edge of the screen.
Why it matters
Most small business sites get a large share of their visits from phones, and a visitor who cannot read your opening hours, prices or contact form will usually leave rather than zoom around. That costs you enquiries and sales, and it makes the business look neglected.
It also affects search. Google mainly uses the mobile version of a page when it indexes and ranks it, so a page that works badly on a phone gives search engines a poor version to judge. There is no security risk here, but trust takes a hit when a site looks out of date.
How to check your site for free
- Open your site on a real phone. This is the most honest test. Check the home page, a text page and your contact page.
- On a computer, make your browser window narrower by dragging its edge. A responsive page reflows and stacks its columns. A fixed-width page stays the same and gets a horizontal scrollbar.
- In Chrome, press
F12, then click the device toolbar icon (or pressCtrl+Shift+M). Pick a phone size from the list and look at the page. - In the same tools, run a Lighthouse report on the mobile setting and read the viewport and tap target findings.
- Ask whoever looks after the site to view the page source and search for
viewport. If there is no viewport tag, the page almost certainly is not set up for phones.
If you want this checked on a schedule, week 5 of SiteMonday is a mobile usability test that ends with a written report and a ranked fix list.
How to fix it in general
Responsive design comes down to three things. If your site was built by a developer or runs on a theme, this is the list to hand over.
1. Add the viewport tag. Inside the <head> of every page there should be this line:
<meta name="viewport" content="width=device-width, initial-scale=1">
Without it, phones pretend the screen is about desktop width and shrink everything.
2. Replace fixed widths with flexible ones. Look in the stylesheet for widths set in pixels on the main wrapper, columns, header and footer. Change them so they can shrink:
.container { width: 100%; max-width: 960px; margin: 0 auto; }
img, video, iframe { max-width: 100%; height: auto; }
3. Use media queries to restack the layout. A media query applies styles only below a certain screen width:
@media (max-width: 768px) {
.sidebar, .content { float: none; width: 100%; }
}
Also check for wide tables, embedded maps or forms, and any text set in very small fixed sizes. Wide tables can be wrapped so they scroll inside their own box instead of stretching the page. If you still get sideways scrolling after these changes, see horizontal scroll on mobile.
If the whole site is built from tables or has pixel widths hard-coded throughout, patching can cost more than starting again. A new responsive theme or template is often the cheaper route.
Common platforms
Menu names differ between versions and themes, so treat these as where to start looking.
| Platform | Where to look |
|---|---|
| WordPress | The active theme. Check Appearance, then Themes, for a modern responsive theme. Custom CSS or page builder sections may also set fixed widths. |
| Joomla | The site template under System, then Site Templates. Older templates are often fixed width. |
| Drupal | The theme under Appearance. Check whether it is a responsive theme and whether custom CSS overrides it. |
| Magento | The storefront theme, plus any custom layout or CSS added by a developer. |
| BigCommerce | The store theme under Storefront. Look for a newer responsive theme and for custom CSS. |
| Wix | Check the mobile view in the editor, and look for wide elements that do not fit. |
| Squarespace | Current templates are responsive, so look for custom code blocks or CSS with fixed widths. |
For step by step help, see the WordPress guide. Guides for the other platforms in the table are at /fix/fixed-width-layout/ followed by the platform name.
How to confirm the fix worked
- Reload the page on a real phone, in both upright and sideways positions. The text should be readable without zooming and the page should only scroll up and down.
- Narrow the browser window on a computer. Columns should stack and nothing should be cut off.
- Run Lighthouse again and compare the mobile findings with your first run.
- Test your most important journeys: finding your phone number, filling in the contact form, and checking out if you sell online.
- Once layout is fixed, buttons and links may still be too close together. See tap targets too small.
How to stop it coming back
- Choose themes and templates that are described as responsive, and test a demo on your phone before committing.
- After adding a new banner, table, embed or page builder section, check it on a phone before publishing.
- Ask your developer to use percentages,
max-widthand relative units rather than fixed pixel widths for layout. - Look at the site on a phone after every theme or plugin update, since updates can change layout.
- Re-test regularly. A recurring mobile check, whether yours or a scheduled one, catches problems before customers do.
A service such as SiteMonday can find and explain these problems, but making the changes is up to you or your developer.
Step by step for your platform
- Fixed-width layout not responsive on WordPress
- Fixed-width layout not responsive on Joomla
- Fixed-width layout not responsive on Drupal
- Fixed-width layout not responsive on Magento
- Fixed-width layout not responsive on Wix
- Fixed-width layout not responsive on Squarespace
- Fixed-width layout not responsive on BigCommerce
Questions
What is a fixed-width layout?
It is a page designed at one set width in pixels, such as 960, that does not adjust to the screen. On phones it appears shrunken or forces sideways scrolling.
Do I need a new website to make it mobile friendly?
Not always. Adding a viewport tag and flexible CSS can fix many sites. If the layout is built on tables or pixel widths throughout, a new responsive theme is often easier.
Does a non-responsive site hurt my Google ranking?
Google mainly uses the mobile version of a page for indexing, so a page that works poorly on phones gives it a weaker version to judge. It also drives visitors away.
Is a separate mobile site a good alternative?
Usually not. One responsive site is easier to maintain, and separate versions often end up with different content. See [mobile and desktop content mismatch](/fix/mobile-desktop-content-mismatch/).
How can I test my site on a phone if I do not have the model?
Use the device toolbar in Chrome developer tools (`F12`, then `Ctrl+Shift+M`) to simulate common phone sizes. A real phone is still the best final check.
Why does my site still scroll sideways after adding the viewport tag?
Something on the page is wider than the screen, often an image, table, embed or fixed-width element. Find it and give it a flexible width or let it scroll inside its own box.