Close Menu
  • Home
  • Life style
    • Beauty tips
    • Exercise & Training
    • Fashion
    • Healthline
  • Exploration
    • Celebrities
    • Business
    • Travel guides
    • Technology
  • Web tutorials
    • Hosting & Servers
    • Blogger guides
    • WordPress guides
  • English
    • Tiếng Việt
    • Hmong
    • English
Facebook YouTube X (Twitter) Instagram
Trending
  • How to Create a Better-Looking Blogger Comment Box with CSS
  • Amazfit’s Lactate Threshold Update: Use the Data to Run at the Right Effort
  • How to Check Whether Yandex Has Indexed an Article
  • Set Yandex Site Region and Check How Your Website Appears
  • What to Prepare Before Connecting a Website to Yandex Webmaster
  • What Is Yandex Webmaster—and When Should Your Website Use It?
  • Create a Yandex ID and Add Your First Website to Webmaster
  • Verify a WordPress Website with Yandex Webmaster: Which Method?
Facebook YouTube X (Twitter) Instagram
SaibABCSaibABC
Chú thích cho quảng cáo
  • Home
  • Life style
    1. Beauty tips
    2. Exercise & Training
    3. Fashion
    4. Healthline
    5. View All

    Build a Simple Skincare Routine Without Buying Too Many Products

    30/08/2026

    How to choose mineral sunscreen that does not leave a white cast

    30/08/2026

    What Does PDRN in Cosmetics Do? How to Read Advertising

    30/08/2026

    Skincare While Losing Weight: Keep Skin More Hydrated, Healthy, and Firm

    30/08/2026

    Running in Hot Weather: Read WBGT and Know When to Stop

    19/09/2026

    Exercise With Atrial Fibrillation: How to Start and Progress Safely

    19/09/2026

    Five-Minute Office Exercises: A Snack-Sized Movement Schedule

    30/08/2026

    Strengthen Your Core with 12 Exercises from Beginner to Advanced

    30/08/2026

    Fashion Digital Product Passport: What Can You Read?

    30/08/2026

    Build a Minimalist Wardrobe in 2026: Buy Less, Wear Longer

    30/08/2026

    Winter Travel Fashion: Stylish Outfits for Men and Women

    22/12/2023

    Amazfit’s Lactate Threshold Update: Use the Data to Run at the Right Effort

    28/09/2026

    Running in Hot Weather: Read WBGT and Know When to Stop

    19/09/2026

    Exercise With Atrial Fibrillation: How to Start and Progress Safely

    19/09/2026

    Suunto Run Heart-Rate Tracking After an Update: Check Your Zones Before Running

    19/09/2026

    Amazfit’s Lactate Threshold Update: Use the Data to Run at the Right Effort

    28/09/2026

    Running in Hot Weather: Read WBGT and Know When to Stop

    19/09/2026

    Exercise With Atrial Fibrillation: How to Start and Progress Safely

    19/09/2026

    Suunto Run Heart-Rate Tracking After an Update: Check Your Zones Before Running

    19/09/2026
  • Exploration
    1. Celebrities
    2. Business
    3. Travel guides
    4. Technology
    Featured

    Samsung Galaxy S26 Ultra Review: What Makes It Worth Buying—and What Doesn’t

    By Nuj Coom16/09/2026
    Recent

    Samsung Galaxy S26 Ultra Review: What Makes It Worth Buying—and What Doesn’t

    16/09/2026

    iPhone 18 Pro Max vs Galaxy S26 Ultra: Which One Should You Choose?

    16/09/2026

    CPU Performance API: Make Web Interfaces Lighter for Low-End Devices

    13/09/2026
  • Web tutorials
    1. Hosting & Servers
    2. Blogger guides
    3. WordPress guides
    4. View All

    Let’s Encrypt on Vultr: Enable HTTPS and Automatic Renewal

    09/09/2026

    Install WordPress on Vultr Manually: From Ubuntu to HTTPS

    08/09/2026

    Point Your Domain to a Vultr VPS and Verify the DNS Connection

    08/09/2026

    Set Up an Ubuntu VPS on Vultr: From Account Creation to SSH

    07/09/2026

    How to Create a Better-Looking Blogger Comment Box with CSS

    28/09/2026

    A 90-Day Blog Growth Plan: Write, Measure, and Improve

    26/09/2026

    Blogspot Maintenance: Fix Broken Links, Images, and Slow Pages

    26/09/2026

    How Does Google Find a Blog? The 3 Key Stages Explained

    26/09/2026

    How to Check Whether Yandex Has Indexed an Article

    26/09/2026

    Set Yandex Site Region and Check How Your Website Appears

    26/09/2026

    What to Prepare Before Connecting a Website to Yandex Webmaster

    26/09/2026

    What Is Yandex Webmaster—and When Should Your Website Use It?

    26/09/2026

    How to Create a Better-Looking Blogger Comment Box with CSS

    28/09/2026

    How to Check Whether Yandex Has Indexed an Article

    26/09/2026

    Set Yandex Site Region and Check How Your Website Appears

    26/09/2026

    What to Prepare Before Connecting a Website to Yandex Webmaster

    26/09/2026
  • English
    • Tiếng Việt
    • Hmong
    • English
SaibABCSaibABC
Home»Web tutorials»Blogger guides»How to Create a Better-Looking Blogger Comment Box with CSS
Blogger guides 10 Mins ReadNo Comments

How to Create a Better-Looking Blogger Comment Box with CSS

Nuj CoomBy Nuj Coom
Facebook Twitter Pinterest LinkedIn Tumblr Email
Chú thích cho quảng cáo

Contents

  1. Prepare and back up the theme
  2. Check the comment settings before creating the box
  3. Insert the CSS sample in Blogger
  4. Customize the colors and corner radius
  5. Check the result on an actual post
  6. When the CSS does not apply or the form does not change
    1. The theme uses different selectors
    2. Form inside an iframe
    3. Code that disrupts the layout
  7. Restore the layout if you no longer want to use the CSS
  8. Signs that you are finished
  9. Reference source

If you want to improve the appearance of a Blogger comment box without replacing the reply or moderation system, start with CSS applied to the theme’s existing elements. This changes presentation only; Blogger continues to manage comment submission, display, and moderation (according to support.google.com).

The target result is a comment area with its own background, a subtle border, rounded corners, clear spacing, and no horizontal overflow on small screens. However, the code below is a reference set of broadly compatible selectors: each theme may use a different HTML structure. If the container changes but the input form does not, the form may be loaded inside an iframe.

Prepare and back up the theme

  • A Blogger/Blogspot blog with at least one post that allows comments.
  • An account with permission to edit the theme.
  • A backup of the current theme.
  • A browser that can open the blog in a separate tab for testing after you save.

Before making changes, go to Theme, open the menu next to the active theme, and download a backup. If you have never created a backup, see the Blogger backup guide. The backup gives you a way back if you insert CSS incorrectly or edit the theme’s HTML directly.

Google explains how to edit a theme’s HTML from Theme > More > Edit HTML and save changes there (according to support.google.com). Button names may vary slightly in the admin interface, so use the Customize or Edit HTML option shown in your blog.

Check the comment settings before creating the box

CSS cannot create a comment element if comments are disabled for the blog or the post does not allow comments. If you want the form to appear directly below the post, check the following:

Chú thích cho quảng cáo
  1. Sign in to Blogger and select the correct blog.
  2. Open Settings > Comments.
  3. Under Comment location, select Embedded if this option is available in your interface.
  4. Check Who can comment to identify who is allowed to submit comments.
  5. Configure Comment moderation if you want to review comments before they are published.
  6. Save the changes, then open a post with comments to use as your test page.

Embedded only determines how the comment area appears in the post; it does not improve the design by itself. If the blog uses a different comment location, you can still style the container once you identify the theme’s correct selector.

Insert the CSS sample in Blogger

For beginners, use the theme’s CSS field first because this does not require editing XML. Do this from the Blogger dashboard:

  1. Go to Theme and select Customize.
  2. Open Advanced, then find the group or field for additional CSS. The name of this section may vary by theme.
  3. Paste all of the code below into that field.
  4. Select Save, Apply to Blog or the equivalent save button.
  5. Open a post with comments in another browser tab to view the result.

If the theme does not have a CSS field, you can use Theme > Edit HTML. In that case, insert the CSS into the theme’s stylesheet area, usually inside <b:skin> following the existing structure. Do not paste the complete <style> tag into an XML location that does not accept it. If you are not familiar with XML, use the custom CSS field instead and keep the backup available for restoration.

/* ===== Khung bình luận Blogger ===== */

:root {
  --comment-bg: #ffffff;
  --comment-soft-bg: #f6f8fb;
  --comment-border: #e2e8f0;
  --comment-text: #263241;
  --comment-muted: #718096;
  --comment-accent: #2563eb;
  --comment-accent-hover: #1d4ed8;
  --comment-radius: 16px;
  --comment-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

/* Vùng bao chính */
#comments,
.comments,
.comments-area {
  width: 100%;
  max-width: 860px;
  margin: 36px auto 0;
  padding: 24px;
  box-sizing: border-box;
  color: var(--comment-text);
  background: var(--comment-bg);
  border: 1px solid var(--comment-border);
  border-radius: var(--comment-radius);
  box-shadow: var(--comment-shadow);
}

/* Tiêu đề khu vực bình luận */
#comments h4,
#comments .title,
.comments h4,
.comments .title {
  margin: 0 0 20px;
  color: var(--comment-text);
  font-size: 1.35rem;
  line-height: 1.4;
  font-weight: 700;
}

/* Bỏ kiểu danh sách mặc định */
#comments ol,
#comments ul,
.comments ol,
.comments ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Từng bình luận */
#comments .comment-block,
#comments .comment-thread li,
.comments .comment-block,
.comments .comment-thread li {
  margin: 0 0 16px;
  padding: 18px;
  background: var(--comment-soft-bg);
  border: 1px solid var(--comment-border);
  border-radius: 12px;
}

/* Khu vực tên và thời gian */
#comments .comment-header,
.comments .comment-header {
  margin-bottom: 10px;
  line-height: 1.5;
}

#comments .comment-header a,
#comments .comment-header cite,
.comments .comment-header a,
.comments .comment-header cite {
  color: var(--comment-text);
  font-weight: 700;
  text-decoration: none;
}

#comments .comment-header .datetime,
#comments .comment-header .timestamp,
.comments .comment-header .datetime,
.comments .comment-header .timestamp {
  display: block;
  margin-top: 3px;
  color: var(--comment-muted);
  font-size: 0.84rem;
  font-weight: 400;
}

/* Nội dung bình luận */
#comments .comment-content,
.comments .comment-content {
  color: var(--comment-text);
  font-size: 0.98rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

#comments .comment-content p,
.comments .comment-content p {
  margin: 0 0 10px;
}

#comments .comment-content p:last-child,
.comments .comment-content p:last-child {
  margin-bottom: 0;
}

/* Liên kết trả lời, xóa hoặc báo cáo */
#comments .comment-actions a,
#comments .comment-reply a,
.comments .comment-actions a,
.comments .comment-reply a {
  color: var(--comment-accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

#comments .comment-actions a:hover,
#comments .comment-reply a:hover,
.comments .comment-actions a:hover,
.comments .comment-reply a:hover {
  color: var(--comment-accent-hover);
  text-decoration: underline;
}

/* Khoảng cách cho bình luận trả lời */
#comments .comment-replies,
.comments .comment-replies {
  margin: 14px 0 0 28px;
}

/* Khu vực thông báo và form */
#comments .comment-form,
#comments .comment-form-thread,
.comments .comment-form,
.comments .comment-form-thread {
  margin-top: 22px;
  padding: 18px;
  background: var(--comment-soft-bg);
  border: 1px dashed var(--comment-border);
  border-radius: 12px;
}

/* Một số theme cho phép định dạng trực tiếp ô nhập */
#comments input[type="text"],
#comments input[type="email"],
#comments textarea,
.comments input[type="text"],
.comments input[type="email"],
.comments textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  box-sizing: border-box;
  color: var(--comment-text);
  background: #ffffff;
  border: 1px solid var(--comment-border);
  border-radius: 10px;
  outline: none;
  font: inherit;
}

#comments input:focus,
#comments textarea:focus,
.comments input:focus,
.comments textarea:focus {
  border-color: var(--comment-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Hiển thị tốt hơn trên điện thoại */
@media (max-width: 600px) {
  #comments,
  .comments,
  .comments-area {
    margin-top: 24px;
    padding: 16px;
    border-radius: 12px;
  }

  #comments .comment-block,
  #comments .comment-thread li,
  .comments .comment-block,
  .comments .comment-thread li {
    padding: 14px;
    border-radius: 10px;
  }

  #comments .comment-replies,
  .comments .comment-replies {
    margin-left: 12px;
  }
}

The code above does not contain any values that must be changed before saving. If you want to change the design, edit only the values in the variable group :root at the beginning of the code, and keep the variable names and semicolons unchanged.

Customize the colors and corner radius

VariableFunctionExample value
--comment-bgBackground of the entire frame#ffffff
--comment-soft-bgBackground of each comment and the form#f6f8fb
--comment-borderBorder color#e2e8f0
--comment-textPrimary text color#263241
--comment-accentReply-link color#2563eb
--comment-radiusMain frame corner radius16px
--comment-shadowFrame elevation0 8px 24px rgba(15, 23, 42, 0.07)

The example below illustrates a dark color scheme. Replace all corresponding variables in :root, then check the text, links, and input area against both light and dark backgrounds:

:root {
  --comment-bg: #111827;
  --comment-soft-bg: #1f2937;
  --comment-border: #374151;
  --comment-text: #f3f4f6;
  --comment-muted: #9ca3af;
  --comment-accent: #93c5fd;
  --comment-accent-hover: #bfdbfe;
}

This is an illustrative example, not a required color scheme. If the text or links are difficult to read, restore the previous colors. Do not hide administration, reply, delete, or report links merely to make the frame more compact.

Check the result on an actual post

Check the result on an actual post
  1. Open a post where comments are enabled.
  2. Reload the page after saving the CSS. If the old styling still appears, try a hard reload with Ctrl + F5 on Windows, or clear the browser cache.
  3. Check the main frame: the background, border, corner radius, and spacing should have changed.
  4. Check a comment: the name, timestamp, content, and reply link should remain readable.
  5. Make the window narrower or open the page on a phone; the content must not overflow horizontally.
  6. Try opening the reply form. If you can open the form and the functional links are still visible, the basic formatting objective has been met.

The observable result should be a changed appearance with the existing functionality preserved. If the blog requires sign-in or moderation before comments appear, that is a Blogger setting, not a CSS error.

When the CSS does not apply or the form does not change

The theme uses different selectors

Selectors such as #comments, .comments and .comments-area are common starting points in this example, but your theme may use different names. Open the blog, right-click the comment area, select Inspect or Inspect, then find the element surrounding the entire area.

For example, if the surrounding element actually has the class my-comments, add a separate rule to the theme’s CSS field:

.my-comments {
  width: 100%;
  max-width: 860px;
  margin: 36px auto 0;
  padding: 24px;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

In this example, .my-comments is only an example name. You must replace it with the class or id shown in your theme’s own inspection tool; do not paste this name as-is if your theme has no corresponding element.

Form inside an iframe

To check, use the Inspect tool and see whether the form is inside an <iframe> element. CSS outside the theme generally cannot select elements inside an iframe that belongs to another document. As a result, the frame and comment list may change style while the input field or submit button retains its old appearance.

This is a limitation of CSS scope and does not necessarily indicate a code error. Do not replace the iframe with a custom form solely to match the colors unless you have your own design for comment storage, authentication, spam prevention, and data security.

Code that disrupts the layout

If the page overflows horizontally or the sidebar is pushed down, take the shortest rollback path:

  1. Temporarily remove the CSS block you just added from the CSS field, or restore the backup if you edited the HTML.
  2. Save and reload the post to determine whether the layout has returned to normal.
  3. If it has, paste the groups back one at a time: the main frame, comments, form, and then the media query.
  4. Stop at the group causing the problem and check the selector, width, padding or any rule with an overly broad effect.

If the blog displays source code or reports an error after you edit the theme, review the theme code before saving any further changes (according to support.google.com).

Restore the layout if you no longer want to use the CSS

If you pasted the code into the custom CSS field, delete the entire block beginning with /* ===== Khung bình luận Blogger ===== */ and ending at the closing brace of the media query, then save it. Open a post with comments afterward to confirm that the layout has returned to its pre-edit state.

If you edited the theme HTML directly and cannot remember where the code is, reload the saved theme backup instead of randomly deleting XML sections. When adding external resources, prefer URLs beginning with https://; resources using http:// may trigger a mixed-content warning on an HTTPS blog (according to support.google.com).

Signs that you are finished

  • The comment area has an appropriate frame, background color, border, and spacing.
  • The content remains easy to read on both desktop and small screens.
  • Reply, administration, and moderation links are not hidden.
  • The comment form still opens, or you have determined that the form is limited by an iframe.
  • You know how to remove the CSS block or restore the backup if you are not satisfied.

Start by changing the colors, corner radius, and box shadow. Make deeper changes, such as styling avatars, reply levels, or the submit button, only after you have identified the theme’s HTML structure correctly.

Reference source

  • Manage your comments – Blogger Help
  • Change the design of your blog – Blogger Help
  • Fix “bx” errors & other problems – Blogger Help
  • Fix mixed content on your blog – Blogger Help

Chú thích cho quảng cáo
beginners Blogger Blogspot CSS interface customization
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Previous ArticleAmazfit’s Lactate Threshold Update: Use the Data to Run at the Right Effort
Nuj Coom
  • Website
  • Facebook
  • X (Twitter)
  • Instagram

I'm a doctor, for sure. But I also love writing and sharing knowledge, life experiences, web tricks, and useful lectures. Let's cheer for your passion.

Related Posts

A 90-Day Blog Growth Plan: Write, Measure, and Improve

26/09/2026

Blogspot Maintenance: Fix Broken Links, Images, and Slow Pages

26/09/2026

How Does Google Find a Blog? The 3 Key Stages Explained

26/09/2026
Add A Comment
Leave A Reply Cancel Reply

Latest posts

Why Your Website Isn’t Appearing on Bing: Diagnose the URL

WordPress 7.1: What Notes, Command Palette, and Abilities API Mean for Editors

How to Create an Author Page for Your Blog to Build Credibility

Set Up Blogger Comment Moderation to Reduce Spam

What Is SEO? A Beginner’s Guide to Content and Website Optimization

Advertisement
Chú thích cho quảng cáo

SUBSCRIBE TO UPDATES

Get the latest creative news from SaibABC.Com on web tips, design, and business.

Copyright © 2024. Designed by NujCoom.
  • Home
  • Contact
  • Privacy
  • Tiếng Việt
  • Hmong

Type above and press Enter to search. Press Esc to cancel.