User Tools

Site Tools


how-do-i-customize-css-or-styling-in-cbsplit

How do I customize CSS or styling in CBSplit?

CBSplit styling lives in your layouts and in stylesheet assets. Content > Assets is where style sheets are uploaded. There is no FTP, and the public wiki does not describe a “Custom CSS” box or a theme-customizer color picker. Menus use the default menu template plus your CSS. A separate mobile layout can replace responsive CSS when the phone page must be different HTML, not just different rules.

Before You Begin

You need access to Content > Assets and Content > Layouts/Themes. Layouts are what CBSplit calls themes. You can keep more than one. A common split is one layout for the home page and another for internal pages.

The layout screen has a mobile tab. If that tab is empty, phones use the default layout. If it has HTML, phones use that HTML. Whether tablets use the mobile layout is set in Admin Options. Verification required: the option's label is not printed; the Layouts article only says the choice is there.

There is no published list of CSS class names for the default menu template. Inspect the rendered page before you target a class. Do not copy class names from WordPress themes.

A stylesheet file still needs to be loaded by the layout or by a snippet. Snippet Insertion can place HTML in the head area of html, at the top of the page, or at the bottom of the page. Verification required: the public URL pattern for a file in Assets is not documented, so a link tag's href must be copied from the file manager.

Step-by-Step Instructions

  1. Upload the .css file in Content > Assets, or add a style block to a snippet if the change is small. Prefer a file when several layouts must share it.
  2. Reference that file from the layout, or insert the link or style element with a snippet insertion aimed at the head. Verification required: which layout control pastes a head include, if any, besides the snippet path.
  3. Write selectors against elements you control. Add a class in the layout HTML, then style that class. That avoids guessing the menu template's classes.
  4. For the menu, the Menus article says to create an XHTML/CSS menu using the default template and your custom CSS. Edit the CSS that already targets the rendered menu. Do not replace the menu tag unless you intend to stop using the menu module.
  5. Keep specificity low. A single class on the element you added will beat a long chain of copied rules, and it is easier to remove. The wiki does not ship a specificity guide. This is ordinary CSS, not a CBSplit switch.
  6. Put phone-only presentation in a media query when the same HTML should adapt. Use the layout mobile tab when the phone page needs different markup. The mobile-detection recipe also shows template conditions on $request.isMobile. The published if example on that page is missing a brace. The unless and ifeq examples are complete. Verification required: confirm the if tag against a working layout before you paste it.
  7. Save the layout, the asset, and the insertion. Test the default layout and the mobile tab separately.
  8. Do not paste CSS into a page from a word processor. The Pages article already warns that the content editor should not receive Microsoft Word paste. The same caution applies to style rules dragged along with that paste.

Example rule for a class you add on the offer layout:

.offer-note {
  color: #1a1a1a;
  font-size: 1.05rem;
}
 
@media (max-width: 640px) {
  .offer-note {
    font-size: 1rem;
  }
}

offer-note is not a built-in CBSplit class. Add class=“offer-note” to the element in your layout, then load this stylesheet.

Example

The offer layout should show a short note under the buy button, slightly smaller on a narrow screen, without a second page URL.

Add class=“offer-note” around that sentence in the layout HTML. Upload the CSS above as an asset and load it from the head. Visitors on a wide window see the larger size. A window under 640 pixels, which is this example's breakpoint and not a CBSplit setting, sees the smaller size.

If marketing instead wants a completely different phone page, leave this query alone and build the phone HTML on the layout mobile tab. Emptying that tab returns phones to the default layout, including this CSS.

How to Verify

  1. Open the public page in a private window.
  2. Confirm the stylesheet request succeeds in the browser's network panel. A 404 means the href does not match the asset. Verification required: copy the asset address again rather than editing the path by hand.
  3. Confirm the note uses the color and size in the rule. If it does not, a later rule is winning. Inspect the element. Do not keep adding !important until you have seen the winning selector.
  4. Narrow the window below 640 pixels and reload. The font size in this example should change. The menu and the page URL should not change.
  5. Open the same URL on a phone if a mobile layout exists. You are then looking at the mobile tab's HTML, which may not include offer-note at all.
  6. Disable the snippet insertion, or remove the link, on a staging layout before you delete the asset. The wiki does not describe asset usage tracking.

Troubleshooting

The rule has no effect

The stylesheet is not loaded, the class is missing on the element, or another rule wins. Check the network panel, then the element's class list. Also check that you edited the layout this page uses. Home and internal pages often use different layouts.

Desktop looks right and the phone looks unstyled

The mobile tab has its own HTML and does not include the stylesheet link. Add the link there, or clear the mobile tab if phones should use the default layout.

The selector does not match the default template. Inspect the rendered menu. Verification required: class names are not in the wiki text. The menu tag still has to be present. See the navigation article.

A site-wide style appears on one campaign only

A snippet insertion can be limited to selected pages, selected page folders, the conversion page, or non-conversion pages. Check the insertion target before you duplicate the CSS.

Tablets ignore the phone layout

Tablet behavior is the Admin Options choice described in the Layouts article, not a CSS breakpoint.

Frequently Asked Questions

Can I theme the whole site from one screen?

The documented tools are layouts, assets, snippets, and menu CSS. Getting Started says to use as few layouts as you can and to keep them simple. A single customizer for brand colors is not documented.

Should I use a CSS framework?

The Layouts article says layouts can be simple header and footer graphics, with or without menus, or complex responsive Bootstrap layouts. Bootstrap is an option you put in the layout. It is not required.

Will this CSS change the admin?

No documented path applies layout CSS to the admin chrome. Test on the public URL.

Is a media query the same as the mobile layout?

No. A media query restyles the same HTML. The mobile tab can send different HTML to phones. $request.isMobile in a template can do that inside one layout body. Confirm the tag syntax before you rely on the wiki's broken if sample.

how-do-i-customize-css-or-styling-in-cbsplit.txt · Last modified: 2026/11/08 08:43 by stephan