• 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

Metro Pro Widget Title

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 › Metro Pro Widget Title

This topic is: not resolved
  • This topic has 1 reply, 2 voices, and was last updated 9 years, 5 months ago by Pixel Frau.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • October 8, 2013 at 3:25 pm #65885
    bandj
    Member

    I would like to make the widget title background a color, but the background goes the whole width of the widget. How would I make the background only be the width of the text, with a little space on each end? My idea is to have a background image along the top of the widget then have a background color for the text to separate it from the background image.

    October 28, 2013 at 11:36 am #69478
    Pixel Frau
    Member

    Look for this section in your CSS:

    .title-area {
    float: left;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 300;
    padding: 12px 0;
    padding: 1.2rem 0;
    width: 33%;
    }

    Change the width from 33% to auto. That will get rid of the extra background area that extends beyond the text.

    Add background-color: #123456; to change the background color behind the text, replacing 123456 with the hex code for the color you want to use.

    Change the padding to padding: 12px 10px; padding: 1.2rem 1rem; so that the background color extends just a bit beyond the text.

    Do you need a background image, or do you just want the top to have a border in a different color? The border will be easier to implement. Add border-top: 5px solid #123456;, replacing 123456 with the hex code for the color you want for the top border. Increase/decrease the 5px to make the border larger or smaller.

    So your final CSS for that section will look something like this:

    .title-area {
    float: left;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 300;
    padding: 12px 10px;
    padding: 1.2rem 1rem;
    width: auto;
    background-color: #123456;
    border-top: 5px solid #123456;
    }
  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 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

© 2023 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