Table of contents9
My first CSS change was a disaster. I wanted to make my site’s buttons rounded instead of square — a tiny change, or so I thought. I pasted some code I found on a forum into the wrong place, and suddenly every image on my site had rounded corners and my menu looked like a pile of pills. I spent an hour undoing it, feeling like I had broken something precious. Then a friend showed me the Customizer’s Additional CSS box, explained what each line of the code actually meant, and the same change took thirty seconds. That was the day I stopped fearing CSS.
I am Yuki Tanaka, and I customize WordPress sites for a living. CSS — the code that controls how your site looks — is the single most useful skill a site owner can learn, because it lets you change almost anything about your design without touching a theme file or hiring a developer.
If CSS has always looked like mysterious symbols to you, this guide will change that. I am giving you 15 copy-paste recipes for the most common design tweaks — buttons, headings, spacing, images, mobile fixes — and with each one, I will explain in plain words what every line actually does. No theory dumps, no jargon walls. Just recipes you can use today.
Whether you have never written a line of code or you already tinker a little, pick the recipes you need and make your site yours.

Here is what this guide covers:
- Where to Put Your Custom CSS (30-Second Setup)
- Buttons: Make Them Yours (Recipes 1–3)
- Headings and Text: Better Readability (Recipes 4–6)
- Spacing and Layout: Room to Breathe (Recipes 7–9)
- Images: Polish Every Picture (Recipes 10–11)
- Mobile Fixes: Look Good on Phones (Recipes 12–13)
- Forms and Navigation: The Finishing Touches (Recipes 14–15)
- Frequently Asked Questions
- Final Thoughts
One quick note before we start: after pasting each recipe, click Publish in the Customizer and check your site. If anything looks wrong, delete what you pasted — the Customizer never saves until you publish, so experimenting is safe.
Where to Put Your Custom CSS (30-Second Setup)
Before the recipes, the setup — because putting CSS in the wrong place is how my first disaster happened. In your WordPress dashboard, go to Appearance, then Customize. In the Customizer sidebar, scroll down and click “Additional CSS.” You get a clean box where you type or paste your code. As you type, the preview on the right updates live — you see every change before it goes public. Nothing is saved until you click Publish at the top.
Why this box and not a plugin or a theme file? Three reasons. First, it is built into WordPress — no extra plugin needed. Second, your CSS survives theme updates (editing theme files directly means losing your changes on the next update). Third, if you ever break something, you just delete the code from the box and everything returns to normal. It is the safest possible place to learn.
One habit that will save you: add a short comment above each recipe you paste, like /* Rounded buttons */. Comments start with /* and end with */ — WordPress ignores them, but future-you will thank present-you when you return in six months wondering what all that code does.
Buttons: Make Them Yours (Recipes 1–3)
Buttons are the first thing visitors click, so they deserve to look intentional. These three recipes cover the most common button wishes.
Recipe 1: Rounded buttons. Tired of sharp square corners? This gives every button softly rounded edges.
/* Rounded buttons */
.wp-block-button__link {
border-radius: 25px;
}
What it does, line by line: the first line (between /* and */) is just a note to yourself. The second line picks the target — every WordPress button. The third line sets how rounded the corners are: 25px makes them nicely pill-shaped. Bigger number, rounder button. That is the whole recipe.
Recipe 2: Bigger, bolder button text. If your buttons whisper when they should speak:
/* Bigger button text */
.wp-block-button__link {
font-size: 18px;
font-weight: bold;
padding: 14px 28px;
}
The font-size line makes the text larger (18px is a comfortable reading size). The font-weight line makes it bold. The padding line adds space inside the button — 14px top and bottom, 28px left and right — so the button feels substantial, not cramped. Padding is the secret ingredient of every good-looking button.
Recipe 3: Button hover effect. This makes buttons subtly grow when a visitor hovers over them — a tiny touch that makes a site feel alive:
/* Button grows on hover */
.wp-block-button__link {
transition: transform 0.2s;
}
.wp-block-button__link:hover {
transform: scale(1.05);
}
The transition line says “animate changes over 0.2 seconds, smoothly.” The :hover part means “when the mouse is over the button.” The transform line scales the button to 105% of its size. Small, smooth, professional — the kind of detail visitors feel but never consciously notice.

Headings and Text: Better Readability (Recipes 4–6)
Most visitors decide whether to read your page in the first three seconds, and headings do most of that convincing. These recipes make your text scannable and pleasant.
Recipe 4: Tighter heading spacing. Big gaps between headings and paragraphs make pages feel disconnected:
/* Tighter heading spacing */
h1, h2, h3 {
margin-bottom: 10px;
}
This picks all three heading sizes and reduces the space below them to 10px. The result: headings sit closer to the text they introduce, and the page reads as one flowing piece instead of scattered blocks.
Recipe 5: Comfortable paragraph width. Lines that stretch across a wide screen are exhausting to read. This keeps text in a comfortable column:
/* Comfortable reading width */
.entry-content p {
max-width: 700px;
}
It limits paragraphs to 700px wide — about the width of a paperback book line. Your eyes will thank you. Note: some themes use a different class than .entry-content. If nothing changes, your theme names it differently — which brings us to Recipe 6’s big lesson about finding the right target.
Recipe 6: Style your links. Default blue underlined links work, but matching them to your brand looks far more professional:
/* Brand-colored links */
a {
color: #79B530;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
This makes all links a fresh green (#79B530 is a color code — six characters describing an exact shade) with no underline, then adds the underline back on hover so visitors still recognize them as clickable. Swap the color code for your brand color and every link on your site matches your identity.
Spacing and Layout: Room to Breathe (Recipes 7–9)
Cramped pages feel cheap. Generous spacing feels premium. These recipes add breathing room where it matters most.
Recipe 7: More space between sections. If your page feels like everything is piled together:
/* Breathing room between blocks */
.wp-block-group {
margin-bottom: 60px;
}
This adds 60px of space below each content group — roughly the height of three text lines. Pages instantly feel calmer and more expensive. Adjust the number up or down to taste; there is no wrong answer, only your preference.
Recipe 8: Remove the gap under images. WordPress sometimes adds awkward space below images that breaks your layout flow:
/* No awkward gap under images */
img {
display: block;
}
One line, one fix. Images are treated as text characters by default (which creates that mysterious gap); this tells the browser to treat them as blocks instead. If you have ever wondered why there is a sliver of space under your images, this is the answer.
Recipe 9: Center your content column. On very wide screens, content hugging the left edge looks unfinished:
/* Center the content column */
.site-content {
max-width: 1100px;
margin-left: auto;
margin-right: auto;
}
The max-width line caps how wide content gets; the two margin lines with “auto” split the leftover space equally on both sides, centering everything. This is the recipe behind nearly every professional-looking centered layout on the web.
Images: Polish Every Picture (Recipes 10–11)
A little CSS turns ordinary images into design elements. Two recipes, big impact.
Recipe 10: Soft image shadows. This adds a gentle shadow that lifts images off the page:
/* Soft shadow under images */
.wp-block-image img {
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}
The box-shadow line has four parts: horizontal offset (0 — centered), vertical offset (4px down), blur (15px — soft), and color (black at 15% transparency). The result looks like the photo is floating slightly above the page. Elegant without being flashy.
Recipe 11: Rounded image corners. Matching your buttons’ rounded style across images ties the whole design together:
/* Rounded image corners */
.wp-block-image img {
border-radius: 12px;
}
Same border-radius idea as Recipe 1, applied to images. 12px is subtle — noticeable but not bubbly. Pair it with Recipe 10’s shadow and your images look like they belong in a magazine.
Mobile Fixes: Look Good on Phones (Recipes 12–13)
More than half your visitors are on phones. These two recipes fix the most common mobile annoyances. They use something called a “media query” — code that only applies on small screens. The pattern is: @media (max-width: 768px) means “only on screens narrower than 768px” — in other words, phones and small tablets.
Recipe 12: Smaller headings on mobile. Big desktop headings become giants on phone screens:
/* Smaller headings on phones */
@media (max-width: 768px) {
h1 {
font-size: 28px;
}
h2 {
font-size: 24px;
}
}
Everything inside the curly braces only happens on small screens. Your desktop headings stay grand; phone headings shrink to fit comfortably. This single recipe fixes more mobile ugliness than any other.

Recipe 13: Full-width buttons on mobile. Small buttons are hard to tap with thumbs:
/* Thumb-friendly buttons on phones */
@media (max-width: 768px) {
.wp-block-button {
width: 100%;
}
.wp-block-button__link {
width: 100%;
text-align: center;
}
}
On phones, buttons stretch to fill the screen width and center their text — big, tappable, impossible to miss. Your mobile visitors will tap more, simply because tapping is easy. If your site takes orders or bookings, this recipe directly makes you money.
Forms and Navigation: The Finishing Touches (Recipes 14–15)
The last two recipes polish the interactive parts of your site — where visitors become customers.
Recipe 14: Better form fields. Default form fields often look flat and dated. This gives them a modern feel:
/* Modern form fields */
input[type="text"],
input[type="email"],
textarea {
border: 2px solid #ddd;
border-radius: 8px;
padding: 12px;
font-size: 16px;
}
It targets text fields, email fields, and message boxes: a soft 2px border, slightly rounded corners, comfortable padding, and 16px text. The 16px matters more than you would think — on iPhones, text smaller than 16px in form fields triggers an annoying auto-zoom when tapped. This recipe prevents that.

Recipe 15: Sticky navigation menu. A menu that stays visible while scrolling means visitors can always find their way:
/* Menu stays visible on scroll */
.site-header {
position: sticky;
top: 0;
z-index: 100;
background: #ffffff;
}
The sticky position glues the header to the top of the screen once you scroll past it. The z-index makes sure it floats above everything else. The background keeps it readable — without it, page content would show through behind the menu. One caution: your theme might name the header differently than .site-header. If nothing happens, use your browser’s Inspect tool (right-click the header, click Inspect) to find the real name — that detective skill unlocks unlimited customization.
Speaking of themes built right: at HyperDAF, our own development team designs every WordPress theme from scratch with clean, customization-friendly code — the kind that makes recipes like these work smoothly instead of fighting you. Our marketplace of our team’s themes, plugins, and tools launches very soon at hyperdaf.com.
Frequently Asked Questions
Will custom CSS break my site? CSS only changes how things look — it cannot delete content or break functionality. The worst case is something looks odd, and deleting the code from the Additional CSS box instantly restores everything. It is one of the safest customizations in WordPress.
Why is my CSS not working? The most common reason is targeting the wrong element name — your theme might call things differently than the recipe assumes. Right-click the element, choose Inspect, and check its actual class name. Our guide on why custom CSS isn’t working (7 fixes) walks through every cause and solution.
Do I need a plugin for custom CSS? No. WordPress has the Additional CSS box built into the Customizer (Appearance → Customize → Additional CSS). Plugins that add CSS features exist, but for the recipes in this guide, the built-in box is all you need.
Will my CSS survive theme updates? Yes — CSS in the Customizer’s Additional CSS box is stored separately from theme files, so updates never touch it. This is exactly why you should never paste CSS directly into theme files. If you switch themes, the CSS stays but might need adjusting for the new theme’s element names.
How do I find the right element name for my theme? Right-click any element on your site and choose “Inspect” (every modern browser has this). A panel opens showing the page’s code with your element highlighted — its class names are right there. It feels technical the first time, but after three tries it becomes second nature, and it is the key to unlimited customization.
Final Thoughts
Remember my pill-shaped menu disaster? These days I laugh about it, because it taught me the two truths of custom CSS: put it in the right place, and understand what each line does. Everything in this guide follows those two rules. Fifteen recipes, each explained in plain words, each safe to try and safe to undo.
Start with one recipe — just Recipe 1, the rounded buttons. Paste it, publish, and look at your site. That small moment of “I made that happen” is how every CSS journey begins. Then try a mobile fix, then a shadow. Within a week, you will read CSS the way you read a recipe card: not as mysterious symbols, but as instructions you understand.
P.S. — if you want WordPress themes with clean, customization-friendly code built by a real expert team, keep an eye on hyperdaf.com. Our marketplace of our own team’s themes, plugins, and tools is launching very soon.
Which recipe did you try first? Show off in the comments — I would love to see what you made. Related guides: How to Customize WordPress Without Breaking It, How to Install a WordPress Theme the Right Way, The Complete Guide to the WordPress Block Editor, 10 Block Editor Workflows That Save You Hours, How to Speed Up WordPress in 2026.











5 comments