• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Auto-size Site Title text to fill fixed size container

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Auto-size Site Title text to fill fixed size container

This topic is: resolved
  • This topic has 2 replies, 2 voices, and was last updated 9 years, 10 months ago by jackirt.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 26, 2016 at 11:26 am #182293
    jackirt
    Member

    Hey there,

    I'm working on a theme that features a sticky left sidebar, with the Site Title area directly above it. The width of both the sidebar and Site Title area are 290px.

    My current site title is short (Felicis) and the size of the font is currently set to 50px. I'm wondering though, if there is a way to auto-resize the site title text to fit the set container, depending on how many characters are in the site title. (For example, my theme's name is "Felicis" at 50px, but if I changed it to "Felicis Test Theme" the font would auto resize to 32px to fit into the 290px container)

    I've seen a little bit of code floating around, but I'm not sure how to target it only at the site title. If anyone has any thoughts or can point me in the right direction, it would be greatly appreciated!

    Jaclyn

    March 26, 2016 at 11:36 am #182295
    Brad Dalton
    Participant

    What code are you referring to?


    Tutorials for StudioPress Themes.

    March 26, 2016 at 11:39 am #182296
    jackirt
    Member

    Hi Brad,

    Just code that came up from a quick google search. Stuff like this:

    http://wordpress.stackexchange.com/questions/55509/automatically-decrease-font-size-for-long-words

    http://stackoverflow.com/questions/687998/auto-size-dynamic-text-to-fill-fixed-size-container

    I'm not that experienced with jQuery, and maybe these hold my answer, but I'd like to target only the Site Title text, nothing else.

    Jaclyn

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble