Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28233
    Johan
    Guest

    I’m building a new website using the Cobalt theme and am having some issues with the mobile responsiveness. The h1 page headers (as well as other headings) do not resize in mobile views. I need the h1 headers to resize automatically as I’m using them as page titles with a background hero image.

    I’ve tried adding the code below under Customizing ▸ Advanced ▸ Custom JS & CSS, but it didn’t work.

    Can someone tell me what code I need to make all h1 headings (or ideally all text on the website) fully responsive.

    h1 {
    font-size: 1vw;
    }

    and

    h1 {
    font-size: clamp(100%, 1rem + 2vw, 16px);
    }
    #28256
    Jesse Owens
    Keymaster

    Hello Johan-

    Both of these CSS rules will work with the addition of an !important tag to override the h1 styles.

    That said, in Cobalt the usual suspects are the h2 and h3 on the homepage, which you can target with h2.alt-font and h3.alt-font.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Cobalt Theme Responsive Text’ is closed to new replies.