• 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

Center content within home top widget area

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 › Center content within home top widget area

This topic is: resolved

Tagged: Center content home top widget area

  • This topic has 9 replies, 3 voices, and was last updated 10 years, 3 months ago by Badlywired.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • February 3, 2015 at 2:04 pm #139543
    Rizk30
    Member

    Hello. The site I am building is not live to the public; therefore, I cannot post a link. I am including three text widgets within the home top widget area. Within each text widget I have content comprised of a header and text. I would like to center the content (the headers and the text within each text widget) that is within the home top widget area. I tried adding css similar to what I used to center the content within the sidebar, but this did not work for the home top widget area. Can anyone tell me how to achieve this? In addition, I would like to style the content in this area as well (change font color, size, etc.)
    Thanks for your help!

    February 3, 2015 at 2:14 pm #139544
    Lauren @ OnceCoupled
    Member

    Without seeing the code, we can't really be specific. In general, you want to find the least-specific CSS selector that will accomplish what you need. I can't tell you what that would be for your specific site though, sorry.

    Best,
    Lauren


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

    February 3, 2015 at 2:23 pm #139545
    Rizk30
    Member

    I was perfectly specific about exactly what I want to achieve. There is nothing site specific about my question other than the child theme Im using (executive pro). If you do not know how to center content within a text widget in the home top widget area, then I guess your not an experienced developer. Going forward, I'd appreciate if you stop reply to my posts saying that you can't help without the site. Thats means you can't help me, end of story, no need to reply. Thanks 🙂

    February 3, 2015 at 2:39 pm #139548
    Lauren @ OnceCoupled
    Member

    Sure, good luck!

    Best,
    Lauren


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

    February 3, 2015 at 2:56 pm #139549
    Lauren @ OnceCoupled
    Member

    Oh, btw, you could probably just use inline styles inside your widget areas. I wouldn't recommend it, of course.

    So, you'd insert something like this into your widget area:

    <h2 style="font-size: 30px; color: red; text-align: center;">Header</h2><p style="font-size: 16px; color: blue; text-align: center;">Test</p>


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

    February 3, 2015 at 3:00 pm #139550
    Rizk30
    Member

    I don't consider myself a professional developer by any means, but Im experienced enough to know that is not the correct way. Of course I know how to do it the wrong way. But I was inquiring here to find the CORRECT way. Thanks again!

    February 3, 2015 at 3:34 pm #139556
    Lauren @ OnceCoupled
    Member

    Well, like I suggested in my original post, "In general, you want to find the least-specific CSS selector that will accomplish what you need." I would use a browser inspector to find this.

    Without seeing your site, there's honestly nothing more anyone could do for you -- you didn't even provide what theme you were using, so we're just donating our free time to help point you in a maybe-helpful direction, which is sort of like grasping at straws.

    I'd recommend being more specific in your original posts, and you'll probably get better responses to what you're trying to ask. It might also help you get some responses to your previous, unanswered questions.

    Best,
    Lauren


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

    February 3, 2015 at 4:15 pm #139559
    Badlywired
    Member

    In your style.css

    div.home-top.widget-area {text-align: center;}

    The advice from Lauren is correct and accurate.

    Step 1. find the selector that is appropriate, the best way to see this is with browser development tools that allow you to inspect elements. In Chrome it is build in (right click), with FireFox you need the Firebug add-in, in IE it is Developer Tools (F12)

    in this case div.home-top.widget-area

    Step2. apply the appropriate css

    probably the best place to find that out if your are not a developer is here http://www.w3schools.com/cssref/default.asp


    My techy blog WordPress and stuff badlywired.com

    February 3, 2015 at 4:30 pm #139561
    Rizk30
    Member

    Lauren's incorrect advice is as follows: "Oh, btw, you could probably just use inline styles inside your widget areas. I wouldn’t recommend it, of course. So, you’d insert something like this into your widget area <h2 style="font-size: 30px; color: red; text-align: center;">Header</h2><p style="font-size: 16px; color: blue; text-align: center;">Test</p>".

    Thats not correct. It will produce errors. Your not supposed to style text within the html, your supposed to use css; you know that; right? Or did you just want to stick up for Lauren? lol.. Regardless, I figured it out a while ago..no need to keep the posts coming. Thanks for the help!

    February 3, 2015 at 5:12 pm #139568
    Badlywired
    Member

    Inline styling has its place in web design, especially where small inlined css can improve performance, and in dynamic site elements where javascript dynamically changes styles, such as sliders. Also inline styles are 100% necessary in html email as css is not interpreted.

    But if course your probably knew that and were just joking.


    My techy blog WordPress and stuff badlywired.com

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 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

© 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