Skip to main content
Technical Enough

Make your site look right on a phone and a computer

Chapter 3 of 7 in Build Your Website or Mobile App · 21 min

You finish the Join page on your laptop, and it looks fine there. You send the link to a friend in the club and ask her to try it. She opens it on her phone and sends back two screenshots. In the first, the text runs past the right edge of the screen, and she has to scroll sideways to finish each line. In the second, the Join button is small and sits right beside the Cancel link, and she writes that she tapped Cancel twice by mistake. You built and checked every page on a laptop screen, and most of the club will open the site on a phone.

You do not need to be a designer to fix this. You need to make a few choices about how the site looks, write them down, and check every page at the width of a phone screen. In this chapter you learn the words for those choices, so that you can tell the agent exactly what you want, and you learn how to see a phone-sized version of any page on your laptop.

Why you design for the phone first

Around the world, about six in ten visits to websites now come from a phone. A phone shows a page in a much narrower space than a laptop does, so a page built for a wide screen has to rearrange itself to fit. Two blocks that sit side by side on a laptop have to sit one above the other on a phone.

A site that rearranges itself to fit the screen it is opened on is called responsive. The agent can build a responsive page, and it often does so without being asked. It still makes its own choices about what goes first and how big things are, and it does not see the page on your friend's phone. You are the one who checks.

On a phone a person reads from the top down and uses one thumb. Put the thing they came for near the top. On the Join page, that is the heading, one line about what membership includes, and the Join button. The photo can come after them.

The choices you make about how a page looks

A page looks the way it does because of five kinds of choice. You make each choice once for the whole site.

  • Layout. The layout of a page is where each thing sits and in what order. Decide how many columns a page has on a computer, and in what order its parts stack in one column on a phone.
  • Spacing. Spacing is the empty space between things. Parts of a page that belong together sit close to each other, and a larger gap separates one section from the next. Use the same two or three gap sizes everywhere.
  • Text size. Sizes on a web page are measured in pixels, the small dots a screen is made of. Set the text people read at 16 pixels or more, which is the size browsers use when a page does not set one. Make headings clearly larger, and use the same few sizes on every page.
  • Color and contrast. Pick one color for text, one for the background, and one for buttons and links. Contrast is how different the text color is from the color behind it. Pale gray text on a white background has low contrast, and it is hard to read outdoors and for anyone whose eyesight is weak. The standard that accessibility laws point to asks for a contrast of at least 4.5 to 1 for ordinary text, and free tools measure it for you.
  • Buttons and links. A fingertip is much wider than a mouse pointer. Make every button at least 44 pixels tall and 44 pixels wide, which is the size Apple asks app makers to use, and leave space between two things a person can tap.

Decide how the site looks once, write the choices down, and have the agent apply them to every page. When every page uses the same text sizes, colors, and spacing, the site looks like one piece of work.

Describe the look in words the agent can build from

In Frontend, what users see you described a screen by saying who is on it and what they see, in order. A description of how the page should look works the same way. Say which page, which part of it, and what you want, with a number wherever a number exists.

Hard for the agent to build fromEasy for the agent to build from
"Make it look better on a phone.""On a phone, put the heading and the Join button above the photo, and make the Join button as wide as the screen."
"The text is too small.""Set the reading text to 16 pixels on every page."
"Use nicer colors.""Use dark navy text on a white background, and use one green for every button."
"It feels cramped.""Leave 16 pixels between items in a list and 32 pixels between sections."

A picture helps as much as words do. If another site has a page you like, take a screenshot, give it to the agent, and say which parts you want to copy, such as the spacing or the size of the headings.

When you have made your choices, ask the agent to save them in the project so that it uses them on every page it builds later. Type: "Save these design choices in a file called DESIGN.md in this project, and follow that file every time you build or change a page." The file is plain text, so you can open it and change a choice whenever you like.

Check every page at phone width

Your browser can show you any page at the width of a phone. You opened DevTools, the panel built into the browser, in The journey of a request. The same panel has a phone view.

  1. Open the page in Chrome on your laptop. Right-click the page and choose Inspect.
  2. Turn on the phone view. Click the button named Toggle device toolbar at the top of the panel. Its name appears when you hold the pointer over it. The page narrows to the width of a phone, and a Dimensions list above the page lets you pick a particular phone.
  3. Check four things on every page. Nothing runs past the right edge, so you never have to scroll sideways. You can read the text without zooming in. Every button and link is big enough to tap, and none sits right beside another. The thing a visitor came for shows before they scroll.
  4. Tell the agent what you saw. Name the page, say that you are looking at it at phone width, and describe what is wrong: "On the Join page at phone width, the text runs past the right edge of the screen." After the agent changes the page, check it again.
  5. Open the site on a real phone. The view on your laptop is an imitation. On your own phone, try to finish the main task of each page with one thumb.

Firefox and Safari have the same view under the name Responsive Design Mode.

Check every page at phone width before anyone else sees it, because most of your visitors will open it on a phone. The browser on your laptop shows you that view in a few seconds.

The obvious objection: the agent already made it look fine

The agent did make the page look fine at the width of your laptop screen, which is where you looked at it. Two things still go wrong when you leave the look to the agent.

  • Each page gets its own look. You ask for pages one at a time, and each time the agent picks sizes, colors, and gaps again. The Join page ends up with larger text than the Trails page and a different green on its button. Written choices that the agent follows on every page prevent this.
  • The agent cannot tell whether the page is easy to use on a phone held in one hand. It can make a button 44 pixels tall when you ask. It cannot tell you that your friend's thumb keeps landing on Cancel. You find that out by checking at phone width and by watching one person use the site.

You do not need a designer's eye for either one. You need a short list of choices and the habit of checking.

What happened when a blind customer could not use a company's site

In September 2016 a man named Guillermo Robles sued Domino's Pizza. Robles is blind, and he uses the internet with a screen reader, which is software that reads a page aloud. He had tried at least twice to order a customized pizza through Domino's website and its phone app, and he could not, because the pages were not built in a way his screen reader could read. Domino's argued that the law on serving disabled customers did not apply to its website and app. In January 2019 a federal appeals court ruled that it does apply, and it sent the case back to the lower court to go ahead.

The way you design a page affects who can use it. Readable text sizes and strong contrast help people whose eyesight is weak, and buttons with clear labels help people who use a screen reader. The law of what you sell: accessibility, subscriptions, and the app stores explains what the law requires and how to test for it.

What you can do now

You can name the choices that decide how a page looks, describe them to the agent with numbers, and save them in one file that the agent follows on every page. You can also look at any page at phone width on your laptop and tell the agent exactly what to fix.

Try it now

This drill takes about twenty minutes, and neither path costs anything.

No setup: On your laptop, open a website you use every day. Right-click the page, choose Inspect, and click Toggle device toolbar. Go through three pages and check the four things from this chapter: nothing runs past the right edge, the text is readable without zooming, the buttons are easy to tap, and the main thing shows first. Write down one thing the site does well on a phone and one thing you would ask its makers to change.

With your tools: Open Claude Code in the running-club folder, or in your own project, and type your design choices in one message: the layout on a phone and on a computer, the text sizes, the three colors, the button size, and the spacing. End the message with: "Save these choices in a file called DESIGN.md, apply them to every page, and tell me the contrast between each text color and the color behind it." Then look at every page at phone width and tell the agent what to fix, one page at a time. Codex and Cursor accept the same requests in their chat panels. If nothing is installed yet, The Setup Clinic covers the install.

Either way, finish by adding these lines to the idea file. If you took the first path, write the choices you would make for your own site.

Layout:   one column on a phone, two on a computer
Text:     16 px for reading, 28 px for headings,
          dark navy on white
Buttons:  one green, 44 px tall, full width on a phone
Checked:  every page at phone width and on my own phone

Chapter Summary

  • About six in ten visits to websites come from a phone, so check every page on a phone-sized screen before you share it.
  • A responsive site rearranges itself to fit the screen it is opened on. On a phone, the parts of a page stack in one column, so put the thing people came for near the top.
  • Five kinds of choice decide how a page looks: layout, spacing, text size, color and contrast, and the size of buttons and links.
  • Set reading text at 16 pixels or more, keep the contrast between text and background at 4.5 to 1 or more, and make every button at least 44 pixels tall and wide.
  • Describe the look to the agent by naming the page, the part, and what you want, with a number wherever a number exists.
  • Save your design choices in one file in the project and tell the agent to follow it, so that every page uses the same sizes, colors, and spacing.
  • To see a page at phone width, open DevTools in Chrome and click Toggle device toolbar. Then check the page on a real phone.
  • The way you design a page affects who can use it. A blind customer who could not order from Domino's website and app took the company to court, and the court ruled that the law covered both.
  • Your artifact is the idea file, which now has four lines about how your site looks and how you checked it.
  • The next chapter is Set up your own domain name and email, where you give the site an address of its own.

Sources

  • Statcounter Global Stats, share of web visits by desktop, mobile, and tablet worldwide, October 2026 (last verified November 2026).
  • W3C, Understanding WCAG 2.2, Success Criterion 1.4.3 Contrast (Minimum) and Success Criterion 2.5.8 Target Size (Minimum) (last verified November 2026).
  • Apple Human Interface Guidelines, Buttons, on a hit region of at least 44 by 44 points (last verified November 2026).
  • MDN Web Docs, the font-size property, on the usual browser default of 16 pixels (last verified November 2026).
  • Chrome DevTools documentation, "Simulate mobile devices with device mode" (last verified November 2026).
  • Firefox DevTools user documentation and Apple's Safari developer documentation on Responsive Design Mode (last verified November 2026).
  • United States Court of Appeals for the Ninth Circuit, Robles v. Domino's Pizza, LLC, No. 17-55504, opinion filed January 15, 2019 (last verified November 2026).