• 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

Looking for CSS help for custom widget

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 › Looking for CSS help for custom widget

This topic is: resolved
  • This topic has 4 replies, 3 voices, and was last updated 5 years, 3 months ago by arhyarion.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • February 13, 2020 at 7:41 am #496705
    arhyarion
    Participant

    I am trying to format a price ticker at the very top of our front page. I followed the instructions here to create a custom widget:

    Add Widget After Header On Home or Front Page in Genesis

    And then I pasted in the ticker code. It worked, but for the life of me I haven't been able to figure out how to modify the CSS so that the white bar is transparent. Even though I added the following code in Additional CSS, it still remains white.

    .widget_text .widget-wrap {
            background:none;
            color: red;
            border-color:transparent;
            border-style:none;
    }
    .widget_text .widget .widget_custom_html {
    	background:none;
    }
    .custom-widget .widget-area {
    	background:none;
    }

    The temporary red font color was applied - but ultimately I'd like white text - centered rather than all the way off to the left - on a transparent background. Any help appreciated. Thanks.

    http://staging6.bsmclient.com
    February 13, 2020 at 7:57 am #496706
    Victor Font
    Moderator

    The white is the background for the HTML body element. The article you followed places the new widget area after the site header. It's being positioned correctly in the DOM, but on the front end it displays before the site header, not after where you added it.

    The problem is because the site-header has a fixed position. Any element that has a fixed position floats above all other elements on the page. You have a few ways of fixing this. You can remove the fixed position for the site header so the new widget area displays beneath it as your code intends, but if you do that, the site header won't display over the photo background any longer.

    You can also move the new widget area into the site-header. Instead of using add-action for genesis_after_header, use genesis_header instead with a lower priority than 10 so it displays on top.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 13, 2020 at 12:26 pm #496709
    arhyarion
    Participant

    Thanks for the reply Victor.

    I found an alternative solution that works almost exactly the way I need.
    I followed the Carrie Dils tutorial to add a utility bar.
    On mobile it looks and behaves exactly the way I want it to. On desktop though, there is a strange looking gap at the top when I start to scroll down the page.

    Is there anything I can do - either with CSS or javascript - to make it so the utility bar and navigation bar scroll up together at the same rate and have the black edge of navigation bar stop at the top of the screen?

    February 14, 2020 at 3:00 am #496722
    rawsta
    Participant

    There are 2 small fixes that could solve it.
    First would be to give the new utility bar also a position:fixed; so it stays in place.

    Alternatively you could add top: 0 to .site-header.dark, which would remove the gap.

    Hope that helps.

    February 14, 2020 at 6:20 am #496726
    arhyarion
    Participant

    Thanks rawsta! The .site-header.dark modification is exactly what I was after!

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Looking for CSS help for custom widget’ is closed to new replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

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