Master complete control over counter text with custom fonts, colors, spacing, shadows, transforms, and responsive sizing
🎯 Overview: Text Styling with Custom CSS
The counter text—phrases like “42 views in 48 hours”—is the primary message your customers see. While the Styling tab offers dropdowns for font family, size, color, and basic shadows, Custom CSS gives you unlimited typographic control:
- 🔤 Custom fonts beyond the dropdown – Use any Google Font, system font, or web font
- 🎨 Advanced colors with transparency – rgba values, gradients, opacity effects
- 📐 Precise spacing control – Letter spacing, line height, vertical offset
- ✨ Multi-layered text shadows – Create depth, glow effects, neon text
- 🔡 Text transforms and styling – Uppercase, lowercase, capitalize, italics, underline
- 📱 Responsive typography – Different font sizes for desktop and mobile
- 🎯 Per-product text styling – Different text styles for different products or categories
- 🌀 Text animations – Keyframe animations for text effects
This article covers every aspect of text styling with Custom CSS, from basic font overrides to complex animated text effects. We’ll explore the .view-counter-text selector and show you exactly how to customize every text property.
💡 Prerequisites: Read “Custom CSS – Getting Started” First
This article assumes you understand CSS selectors, the !important flag, per-product targeting with .postid-X, and how to access the Custom CSS box. If you’re new to Custom CSS, start with Custom CSS – Getting Started.
🧩 The Text Selector
All counter text is wrapped in a <span> with the class .view-counter-text:
HTML Structure
<div class="product-views-counter">
<div class="view-counter-wrapper">
<div class="view-counter-icon-wrapper">...</div>
<span class="view-counter-text">42 views in 48 hours</span>
</div>
</div>Key selector: .view-counter-text targets the text span. All text styling CSS should use this selector.
🔤 Font Family: Beyond the Dropdown
The Styling tab offers ~100 fonts, but Custom CSS lets you use any font, including custom web fonts.
Using Google Fonts
To use a Google Font not in the dropdown:
- Go to https://fonts.google.com/
- Find a font (e.g., “Montserrat”)
- Click “Get Font” → “Embed”
- Copy the
<link>tag and add it to your theme’s header (or use a plugin like “Insert Headers and Footers”) - Use the font in Custom CSS
/* Use Google Font "Montserrat" */
.view-counter-text {
font-family: 'Montserrat', sans-serif !important;
}System Fonts (No Loading Required)
/* Arial (system font) */
.view-counter-text {
font-family: Arial, sans-serif !important;
}
/* Georgia (serif) */
.view-counter-text {
font-family: Georgia, serif !important;
}
/* Courier New (monospace) */
.view-counter-text {
font-family: 'Courier New', monospace !important;
}Font Stacks (Fallbacks)
Always provide fallback fonts in case the primary font fails to load:
/* Font stack: Roboto → Helvetica → Arial → sans-serif */
.view-counter-text {
font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif !important;
}⚖️ Font Weight: From Thin to Black
Font weight controls text boldness. Values range from 100 (thin) to 900 (black):
| Value | Name | Appearance |
|---|---|---|
100 | Thin | Very light, delicate text |
300 | Light | Subtle, elegant text |
400 | Normal (default) | Standard readable weight |
600 | Semi-Bold | Slightly bold, emphasizes without overwhelming |
700 | Bold | Strong emphasis, highly visible |
900 | Black | Ultra-bold, maximum weight |
Examples
/* Light, elegant text */
.view-counter-text {
font-weight: 300 !important;
}
/* Bold, attention-grabbing text */
.view-counter-text {
font-weight: 700 !important;
}
/* Ultra-bold text for premium products */
.postid-456 .view-counter-text {
font-weight: 900 !important;
}Note: Not all fonts support all weights. Google Fonts often only include 400 (normal) and 700 (bold). Check the font’s available weights before using values like 100 or 900.
🎨 Text Color: Beyond the Color Picker
Basic Color Override
/* Bright red text */
.view-counter-text {
color: #ef4444 !important;
}Transparent Text with rgba
/* Semi-transparent black text (70% opacity) */
.view-counter-text {
color: rgba(0, 0, 0, 0.7) !important;
}
/* Semi-transparent white text (80% opacity) */
.view-counter-text {
color: rgba(255, 255, 255, 0.8) !important;
}Gradient Text (Webkit Only)
Create gradient text effects in Chrome, Safari, and Edge:
/* Purple to pink gradient text */
.view-counter-text {
background: linear-gradient(135deg, #667eea 0%, #ecee8ce259@f2a20d01.com%) !important;
-webkit-background-clip: text !important;
-webkit-text-fill-color: transparent !important;
background-clip: text !important;
}
/* Gold gradient (luxury effect) */
.view-counter-text {
background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%) !important;
-webkit-background-clip: text !important;
-webkit-text-fill-color: transparent !important;
}Fallback for Firefox:
/* Gradient with solid fallback */
.view-counter-text {
color: #667eea !important; /* Fallback for Firefox */
background: linear-gradient(135deg, #667eea 0%, #ecee8ce259@f2a20d01.com%) !important;
-webkit-background-clip: text !important;
-webkit-text-fill-color: transparent !important;
}📏 Font Size: Desktop & Mobile Control
Desktop Font Size
/* Larger text (18px) */
.view-counter-text {
font-size: 18px !important;
}
/* Smaller text (12px) */
.view-counter-text {
font-size: 12px !important;
}Responsive Font Sizes
/* 18px on desktop, 14px on mobile */
.view-counter-text {
font-size: 18px !important;
}
@media (max-width: 768px) {
.view-counter-text {
font-size: 14px !important;
}
}Per-Product Font Sizes
/* Huge text for premium product (ID 123) */
.postid-123 .view-counter-text {
font-size: 24px !important;
font-weight: 700 !important;
}
/* Tiny text for sale items */
.product_cat-sale .view-counter-text {
font-size: 11px !important;
}📐 Letter Spacing & Line Height
Letter Spacing (Tracking)
Letter spacing adds horizontal space between characters. Useful for all-caps text or loose typographic styles:
/* Wide letter spacing (1.5px) - good for uppercase */
.view-counter-text {
letter-spacing: 1.5px !important;
text-transform: uppercase !important;
}
/* Tight letter spacing (-0.5px) - condensed look */
.view-counter-text {
letter-spacing: -0.5px !important;
}
/* Normal spacing (reset to default) */
.view-counter-text {
letter-spacing: 0 !important;
}Vertical Offset (Baseline Shift)
The plugin uses margin-top (inverted) for vertical offset. Positive values move text up, negative values move text down:
/* Move text up 3px (for icon alignment) */
.view-counter-text {
margin-top: -3px !important;
}
/* Move text down 2px */
.view-counter-text {
margin-top: 2px !important;
}
/* Or use transform (doesn't affect layout) */
.view-counter-text {
transform: translateY(-3px) !important;
}✨ Text Shadows: Depth and Glow
Text shadows use text-shadow with the format: x-offset y-offset blur color.
Basic Text Shadow
/* Subtle black shadow (x=1px, y=1px, blur=2px) */
.view-counter-text {
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}Glow Effect (No Offset)
/* Blue glow (x=0, y=0, blur=8px) */
.view-counter-text {
text-shadow: 0 0 8px rgba(59, 130, 246, 0.8) !important;
}
/* Neon pink glow */
.view-counter-text {
color: #ec4899 !important;
text-shadow: 0 0 12px rgba(236, 72, 153, 1) !important;
}Multiple Layered Shadows
Stack multiple shadows (comma-separated) for depth:
/* Layered shadow: close shadow + outer glow */
.view-counter-text {
text-shadow:
1px 1px 2px rgba(0, 0, 0, 0.2),
0 0 12px rgba(59, 130, 246, 0.6) !important;
}
/* 3D effect with multiple layers */
.view-counter-text {
color: #ffffff !important;
text-shadow:
1px 1px 0 #000000,
2px 2px 0 #000000,
3px 3px 0 #000000,
4px 4px 6px rgba(0, 0, 0, 0.5) !important;
}Animated Shadow (Pulsing Glow)
/* Pulsing blue glow */
.view-counter-text {
animation: text-glow-pulse 2s ease-in-out infinite !important;
}
@keyframes text-glow-pulse {
0%, 100% {
text-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}
50% {
text-shadow: 0 0 20px rgba(59, 130, 246, 1);
}
}🔡 Text Transforms and Styling
Text Transform (Capitalization)
/* ALL UPPERCASE */
.view-counter-text {
text-transform: uppercase !important;
letter-spacing: 1px !important; /* Recommended for uppercase */
}
/* all lowercase */
.view-counter-text {
text-transform: lowercase !important;
}
/* Capitalize Each Word */
.view-counter-text {
text-transform: capitalize !important;
}
/* Reset to normal */
.view-counter-text {
text-transform: none !important;
}Font Style (Italics)
/* Italic text */
.view-counter-text {
font-style: italic !important;
}
/* Normal (not italic) */
.view-counter-text {
font-style: normal !important;
}Text Decoration (Underline, Strikethrough)
/* Underlined text */
.view-counter-text {
text-decoration: underline !important;
}
/* Strikethrough (useful for "was X views") */
.view-counter-text {
text-decoration: line-through !important;
}
/* Remove decoration */
.view-counter-text {
text-decoration: none !important;
}↔️ Text Alignment
Text alignment controls how text positions within the counter container:
/* Left-aligned text */
.product-views-counter {
justify-content: flex-start !important;
}
/* Centered text */
.product-views-counter {
justify-content: center !important;
}
/* Right-aligned text (default) */
.product-views-counter {
justify-content: flex-end !important;
}Note: Text alignment uses Flexbox justify-content on the container, not text-align on the text itself.
🌀 Text Animations
Fade In on Load
/* Fade in over 1 second */
.view-counter-text {
animation: text-fade-in 1s ease forwards !important;
}
@keyframes text-fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}Slide In from Right
/* Slide in from right */
.view-counter-text {
animation: text-slide-in 0.8s ease forwards !important;
}
@keyframes text-slide-in {
from {
transform: translateX(50px);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}Color Pulse on Hover
/* Text color changes on hover */
.view-counter-text {
transition: color 0.3s ease !important;
}
.product-views-counter:hover .view-counter-text {
color: #ef4444 !important;
}Typewriter Effect (Advanced)
This is complex and requires JavaScript, but here’s a CSS-only approximation using animation:
/* Typewriter reveal effect */
.view-counter-text {
overflow: hidden;
white-space: nowrap;
animation: typewriter 2s steps(20, end) forwards !important;
}
@keyframes typewriter {
from {
width: 0;
}
to {
width: 100%;
}
}🎨 Real-World Text Styling Examples
Example 1: Bold Uppercase with Wide Spacing
/* Bold, uppercase, spaced text */
.view-counter-text {
font-weight: 700 !important;
text-transform: uppercase !important;
letter-spacing: 1.5px !important;
font-size: 14px !important;
color: #1e40af !important;
}Example 2: Elegant Light Text with Subtle Shadow
/* Light, elegant text */
.view-counter-text {
font-family: 'Playfair Display', serif !important;
font-weight: 300 !important;
font-size: 16px !important;
color: #374151 !important;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1) !important;
}Example 3: Neon Glow Text (Cyberpunk)
/* Bright cyan text with neon glow */
.view-counter-text {
font-family: 'Orbitron', sans-serif !important;
font-weight: 700 !important;
font-size: 16px !important;
color: #06b6d4 !important;
text-transform: uppercase !important;
letter-spacing: 2px !important;
text-shadow:
0 0 4px rgba(6, 182, 212, 1),
0 0 8px rgba(6, 182, 212, 0.8),
0 0 16px rgba(6, 182, 212, 0.5) !important;
}Example 4: Category-Based Text Colors
/* Blue text for Electronics */
.product_cat-electronics .view-counter-text {
color: #3b82f6 !important;
}
/* Pink text for Clothing */
.product_cat-clothing .view-counter-text {
color: #ec4899 !important;
}
/* Green text for Home & Garden */
.product_cat-home-garden .view-counter-text {
color: #10b981 !important;
}Example 5: Responsive Typography
/* Large text on desktop, smaller on mobile */
.view-counter-text {
font-size: 20px !important;
font-weight: 600 !important;
letter-spacing: 0.5px !important;
}
@media (max-width: 768px) {
.view-counter-text {
font-size: 14px !important;
font-weight: 500 !important;
letter-spacing: 0.3px !important;
}
}🔍 Troubleshooting Text Styles
Issue 1: Font Not Changing
Cause: Font not loaded, or missing !important.
Solution:
/* ✅ CORRECT: With !important */
.view-counter-text {
font-family: 'Roboto', sans-serif !important;
}
/* ❌ WRONG: No !important */
.view-counter-text {
font-family: 'Roboto', sans-serif; /* Plugin wins */
}Also ensure the font is loaded (check DevTools → Network tab for font file).
Issue 2: Text Shadow Not Visible
Cause: Shadow color too similar to text color, or blur too small.
Solution:
/* ✅ CORRECT: High contrast shadow */
.view-counter-text {
color: #ffffff !important;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7) !important;
}
/* ❌ WRONG: Black text with black shadow (invisible) */
.view-counter-text {
color: #000000 !important;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}Issue 3: Letter Spacing Not Applying
Cause: Value too small to notice, or missing !important.
Solution:
/* ✅ CORRECT: Noticeable spacing */
.view-counter-text {
letter-spacing: 1.5px !important;
}
/* ❌ WRONG: Too subtle (0.1px barely visible) */
.view-counter-text {
letter-spacing: 0.1px !important;
}Issue 4: Gradient Text Not Showing
Cause: Using Firefox (doesn’t support -webkit-background-clip: text).
Solution: Always provide a solid color fallback:
/* ✅ CORRECT: With fallback */
.view-counter-text {
color: #667eea !important; /* Solid fallback for Firefox */
background: linear-gradient(135deg, #667eea 0%, #ecee8ce259@f2a20d01.com%) !important;
-webkit-background-clip: text !important;
-webkit-text-fill-color: transparent !important;
}✅ Quick Reference: Text Styling Essentials
| Property | Example |
|---|---|
| Font Family | font-family: 'Roboto', sans-serif !important; |
| Font Weight | font-weight: 700 !important; |
| Font Size | font-size: 18px !important; |
| Text Color | color: #ef4444 !important; |
| Text Shadow | text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important; |
| Letter Spacing | letter-spacing: 1.5px !important; |
| Vertical Offset | margin-top: -3px !important; or transform: translateY(-3px) !important; |
| Text Transform | text-transform: uppercase !important; |
| Font Style | font-style: italic !important; |
| Text Decoration | text-decoration: underline !important; |
| Gradient Text | background: linear-gradient(...) !important; |