WhoKnew Views™ | Width & Breakpoint (Responsive Sizing)

Skip to main content
Table of Contents
Print

Control Counter Width and Screen-Size Responsiveness with Three Powerful Settings

While Top/Bottom/Left/Right coordinates control where your counter appears, the Width and Breakpoint settings control how wide it is—and how that width adapts to different screen sizes. These three settings work together to create a fully responsive counter that looks perfect on desktop, tablet, and mobile devices.

Think of width as a horizontal constraint on your counter. Instead of stretching edge-to-edge, you can limit it to a percentage of the product gallery’s width, allowing precise control over placement and preventing text from wrapping awkwardly.

⚡ Quick Win: The default settings (Width Default: 50%, Width Small: 100%, Breakpoint: 1024px) work for 95% of stores. But if your counter text wraps to multiple lines or looks cramped on mobile, adjusting these three values fixes it instantly.


📊 The Three Width & Breakpoint Settings

SettingDefaultControlsWhen It Applies
Width (Default, %)50%Counter width on large screensAbove breakpoint (desktop/tablet)
Width (Small Screens, %)100%Counter width on small screensBelow breakpoint (mobile)
Breakpoint (px)1024pxScreen width where mobile styles activateThreshold between desktop/mobile widths

📐 Setting 1: Width (Default, %)

This setting controls the horizontal width of your counter on large screens (desktop and tablets above the breakpoint). It’s expressed as a percentage of the product gallery container.

🔍 How It Works

The width percentage determines how much horizontal space the counter occupies within its positioning context. For example:

  • 50% width → Counter occupies half the product gallery’s width
  • 100% width → Counter stretches full-width across the gallery
  • 25% width → Counter occupies one-quarter of the gallery width
Visual Example
Product Gallery (100% width)
┌─────────────────────────────────────┐
│  Width: 50%                         │
│  ┌─────────────────┐                │
│  │ Counter (50%)   │                │
│  └─────────────────┘                │
│                                     │
│  Width: 100%                        │
│  ┌──────────────────────────────┐   │
│  │ Counter (100%)               │   │
│  └──────────────────────────────┘   │
└─────────────────────────────────────┘

✅ When to Use Different Width Values

Width ValueVisual EffectBest For
25-40%Narrow counter, lots of empty spaceShort text (“487 views”), minimal counter
50% ⭐Balanced, half-widthDefault, works for most text lengths
60-80%Wide counter, less empty spaceLonger text (“487 people viewed this in 48 hours”)
100%Full-width, edge-to-edgeMaximum text space, banner-style counters

💡 Pro Tip: If your counter text wraps to multiple lines on desktop (which usually looks bad), increase Width Default to 60% or 70%. This gives the text more horizontal space, preventing wrapping. Alternatively, shorten your Display Text or reduce font size.

🔗 Interaction with Positioning

Width works together with your position coordinates:

Position CoordinatesWidthResult
left: 0px;50%Counter starts at left edge, extends halfway across
left: 50%;50%Counter centered (with auto-transform), half-width
right: 0px;30%Counter anchored to right edge, 30% wide
left: 0px;100%Counter spans entire gallery width (full-width banner)
🎨 Creative Positioning with Width

You can use width strategically to push the counter to one side:

  • Left-aligned narrow counter: left: 0px; width: 30%; → Counter hugs left edge, only 30% wide
  • Right-aligned narrow counter: right: 0px; width: 30%; → Counter hugs right edge, only 30% wide
  • Centered narrow counter: left: 50%; width: 40%; → Counter centered, 40% wide (with auto-transform)

📱 Setting 2: Width (Small Screens, %)

This setting controls the counter width on small screens (mobile devices below the breakpoint). It operates identically to Width Default, but only applies when screen width is below the breakpoint.

🔍 How It Works

When a user’s screen is below the breakpoint (default: 1024px), the counter automatically switches from Width Default to Width Small. This is achieved via a CSS media query:

/* Desktop (above breakpoint) */
.product-views-counter {
    width: 50%; /* Width Default */
}
/* Mobile (below breakpoint) */
@media (max-width: 1024px) {
    .product-views-counter {
        width: 100%; /* Width Small */
    }
}

✅ Why Width Small Defaults to 100%

Mobile screens are narrow, so giving the counter full width (100%) prevents text wrapping and ensures readability. On a 375px-wide phone screen, a 50%-wide counter (187px) might cause “487 views in 48 hours” to wrap awkwardly. At 100% width, the text has maximum space.

Screen SizeWidth SettingRationale
Desktop (1920px wide)50% (960px counter)Plenty of space; half-width looks balanced
Tablet (768px wide)50% (384px counter)Still enough space; half-width works
Mobile (375px wide)100% (375px counter)Maximizes text space; prevents wrapping

🎛️ When to Adjust Width Small

ScenarioRecommended Width SmallReason
Short text (“487 views”)60-80%Text doesn’t need full width; narrower looks better
Long text (“487 people viewed”)100% ⭐Maximum space prevents wrapping
Centered mobile counter70-90%Leaves breathing room on left/right edges
Right-aligned mobile counter50-70%Narrow counter hugs right edge

💡 Mobile UX Tip: If your mobile counter overlaps important product features (like the “Add to Cart” button or product rating), reduce Width Small to 80% or 90% and use Mobile Position Override (see dedicated article) to reposition it. This gives mobile users a cleaner, less cluttered experience.


📏 Setting 3: Breakpoint (px)

The Breakpoint is the screen width (in pixels) that determines when the counter switches from “desktop” styling (Width Default) to “mobile” styling (Width Small). It’s the threshold between large and small screens.

🔍 How It Works

The breakpoint creates a CSS media query that activates at or below the specified pixel width:

/* Breakpoint: 1024px */
@media (max-width: 1024px) {
    .product-views-counter {
        width: 100%; /* Width Small applies */
        font-size: 12px; /* Font Size Small applies */
        /* Mobile Position Override applies (if enabled) */
    }
}

When a user’s screen is:

  • 1025px or wider → Uses Width Default, Font Size Default, desktop positions
  • 1024px or narrower → Uses Width Small, Font Size Small, mobile positions (if override enabled)

📊 Common Breakpoint Values

BreakpointTarget DevicesWhen to Use
768pxTablets & phones (portrait)Aggressive mobile-first approach
1024px ⭐Tablets (landscape) & phonesDefault, balanced for most stores
1280pxSmall laptops, tablets, phonesConservative, treats more devices as “mobile”
1440pxMedium laptops & belowVery conservative, optimizes for large screens
🎯 Choosing the Right Breakpoint

Your ideal breakpoint depends on your target audience’s devices and theme design:

  • E-commerce stores (broad audience): 1024px (default) works for 95% of cases
  • Mobile-heavy stores: 768px treats more devices as desktop, reducing mobile optimizations
  • B2B stores (desktop-focused): 1280px or 1440px ensures even laptops get mobile-optimized counters
  • Match your theme’s breakpoint: If your WooCommerce theme switches to mobile layout at 768px, use 768px for consistency

⚠️ Important: The breakpoint affects multiple settings, not just width. When the screen drops below the breakpoint, the counter also switches to Font Size Small, Icon Size Small, and Mobile Position Override (if enabled). Think of it as a global “mobile mode” trigger.

🔧 What Changes at the Breakpoint

When screen width drops below the breakpoint, five settings automatically switch:

SettingAbove Breakpoint (Desktop)Below Breakpoint (Mobile)
Counter WidthWidth Default (e.g., 50%)Width Small (e.g., 100%)
Font SizeFont Size Default (e.g., 15px)Font Size Small (e.g., 12px)
Icon SizeIcon Size (e.g., 12px)Icon Size Small (e.g., 12px)
Position CoordinatesTop/Bottom/Left/Right (desktop values)Mobile Top/Bottom/Left/Right (if override enabled)
VisibilityVisible (unless “Mobile Only” set)Visible (unless “Desktop Only” set)

🔗 How Width & Breakpoint Work Together

📐 The Responsive Width System

These three settings create a two-tier responsive system:

Screen Width Decision Tree:
Is screen ≥ Breakpoint (1024px)?
  ↓ YES (Desktop/Tablet)
  └─→ Apply Width Default (50%)
  ↓ NO (Mobile)
  └─→ Apply Width Small (100%)

🛠️ Common Width & Breakpoint Recipes

Recipe 1: Default (Balanced for All Devices)
SettingValue
Width (Default)50%
Width (Small)100%
Breakpoint1024px

Result: Half-width on desktop/tablets, full-width on phones. Universal solution.

Recipe 2: Compact Counter (Short Text)
SettingValue
Width (Default)30%
Width (Small)60%
Breakpoint768px

Result: Narrow counter on all devices. Works for “487 views” (short text). Avoids full-width on mobile.

Recipe 3: Full-Width Banner Style
SettingValue
Width (Default)100%
Width (Small)100%
Breakpoint1024px

Result: Full-width on all devices. Banner-style counter that spans entire product gallery.

Recipe 4: Mobile-First Aggressive
SettingValue
Width (Default)50%
Width (Small)100%
Breakpoint768px

Result: Treats tablets as desktop (50% width), only phones get full-width (100%). Maximizes desktop real estate.

Recipe 5: Conservative Desktop-Focused
SettingValue
Width (Default)40%
Width (Small)90%
Breakpoint1440px

Result: Even small laptops (1366px) get mobile-optimized width. Narrow on large desktops, generous on smaller screens.


🛠️ Troubleshooting Width & Breakpoint Issues

Issue 1: “My counter text wraps to multiple lines on desktop”

Root Cause

Width Default is too narrow for your text length.

✅ Solution
  • Increase Width Default: Try 60%, 70%, or 80% to give text more horizontal space
  • Alternative: Shorten your Display Text (e.g., “487 views” instead of “487 people viewed this product”)
  • Alternative: Reduce Font Size Default from 15px to 13px or 14px

Issue 2: “Counter looks tiny on mobile”

Root Cause

Width Small is too narrow (e.g., 50% or 60%) for small screens.

✅ Solution
  • Set Width Small to 100% (default)
  • Ensure Breakpoint is 1024px or lower (not 1440px)
  • Check that Font Size Small isn’t too small (minimum 10-11px recommended)

Issue 3: “Mobile styles aren’t applying on tablets”

Root Cause

Breakpoint is too low (e.g., 768px), so tablets (1024px wide) are treated as desktop.

✅ Solution
  • Increase Breakpoint to 1024px or 1280px
  • This treats tablets as “mobile,” applying Width Small and other mobile settings

Issue 4: “Desktop counter looks too wide”

Root Cause

Width Default is too high (e.g., 80% or 100%).

✅ Solution
  • Reduce Width Default to 50% (default) or 40%
  • Pair with left: 0px; positioning to hug the left edge
  • Or use right: 0px; to hug the right edge

Issue 5: “Mobile counter overlaps product features”

Root Cause

Width Small is 100%, making the counter very wide and potentially blocking important UI elements.

✅ Solution
  • Reduce Width Small to 80% or 90%
  • Enable Mobile Position Override to reposition the counter away from buttons/ratings
  • Consider using Mobile Visibility: Desktop Only if the counter isn’t critical on mobile

📚 Technical Deep Dive: CSS Media Queries

Generated CSS Example

Your Settings:

  • Width Default: 50%
  • Width Small: 100%
  • Breakpoint: 1024px

Plugin Generates:

/* Desktop Styles (default) */
.product-views-counter {
    width: 50%; /* Width Default */
    font-size: 15px; /* Font Size Default */
    /* ...other styles... */
}
/* Mobile Styles (below breakpoint) */
@media (max-width: 1024px) {
    .product-views-counter {
        width: 100%; /* Width Small */
        font-size: 12px; /* Font Size Small */
        /* Mobile Position Override styles (if enabled) */
    }
}

🔍 How Browsers Apply Media Queries

Media queries are evaluated in real-time as the browser window resizes:

  1. User loads page on 1920px-wide desktop → Desktop styles apply (Width Default: 50%)
  2. User resizes browser to 1000px → Breakpoint crossed! Mobile styles apply (Width Small: 100%)
  3. User resizes back to 1100px → Desktop styles reapply (Width Default: 50%)

This is why you can test breakpoints by resizing your browser without refreshing the page!

🧪 Testing Tip: To test your breakpoint, open your product page, then slowly resize your browser window from wide to narrow. Watch the counter change at exactly the breakpoint width. Use browser DevTools (F12 → Toggle Device Toolbar) to simulate exact device widths like iPhone (375px) or iPad (768px).


🎓 Best Practices & Recommendations

✅ Do’s

  • Start with defaults (50% / 100% / 1024px) and adjust only if needed
  • Test on real devices after adjusting—desktop preview doesn’t show the full mobile experience
  • Match your theme’s breakpoint for consistency (check theme documentation)
  • Use 100% width on mobile (Width Small) to prevent text wrapping
  • Increase Width Default if text wraps on desktop (60-80% usually fixes it)
  • Test by resizing your browser to see the breakpoint in action
  • Combine with Mobile Position Override for full mobile customization

❌ Don’ts

  • Don’t set Width Small below 60% on mobile—text will likely wrap
  • Don’t use extreme breakpoints (below 600px or above 1600px) unless you have a specific reason
  • Don’t forget to test tablets (768-1024px)—they’re often overlooked
  • Don’t set Width Default to 100% unless you want a full-width banner style
  • Don’t ignore text wrapping—it’s the #1 sign your width is too narrow

🎯 Golden Rule: Your counter should never wrap to multiple lines unless intentional. If it does, the width is too narrow for your text length. Increase Width Default/Width Small or shorten your text. One-line counters look professional; wrapped counters look broken.


🔗 Related Articles

  • Top, Bottom, Left, Right Controls: Position coordinates work with width to control placement
  • Mobile Position Overrides: Set different coordinates for mobile (separate from width)
  • Mobile Font & Icon Sizes: Font Size Small and Icon Size Small also activate at the breakpoint
  • Mobile Visibility Settings: Hide counter on desktop or mobile using the breakpoint
  • Padding & Spacing: Internal spacing within the counter (independent of width)

🚀 Next Steps: Now that you control width and responsiveness, the next article (Z-Index & Layer Management) teaches you how to control stacking order—ensuring your counter appears above (or below) product images, badges, and other theme elements. Master all three = Complete positioning control.

Share