• 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

Header Justification

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 › General Discussion › Header Justification

This topic is: not resolved
  • This topic has 5 replies, 2 voices, and was last updated 8 years, 1 month ago by WhiteleyDesigns.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • February 16, 2015 at 9:56 am #141022
    defree99
    Participant

    I have a website using the Executive Pro Theme here:

    http://tinyurl.com/ouhzkgp

    I am trying to get the Header Right Widget and Menu lines "block justified" (don't ask, it's a long story).

    Please see the image here showing what I am trying to doShowing Justification.

    1) Within the Header Right Widget I am trying to align the phone number to the left, and put the social media icons on the right - but on the same line

    2) On the Menu line I am trying to make the menu items spread across the entire website , left justifying Home and right justifying Contact Us

    3) I know this is stupid to do, but again, it's a long story.

    How can I get these 2 things accomplished?

    February 16, 2015 at 11:13 am #141027
    WhiteleyDesigns
    Member

    For the navigation, if you plan on keeping that exact number of top level navigation links you could simply use CSS to expand them to fit the entire with, then center the text in each

  • element like so:
    nav .genesis-nav-menu .menu-item {
         width: 14.01%;
    }
    nav .genesis-nav-menu .menu-item a {
         text-align: center;
    }

    For the phone number and social links, you'd need some more markup to get them to go where you'd like and stay in the correct order (ie. put a wrapper around all the nav items so they could be moved as a group). As you have it now you could do something like this, but your social links will be in reverse order:

    .site-header .text-widget .center {
         text-align: left;
    }
    .site-header .text-widget .center a {
         float: right
    }
    

    This certainly isn't ideal and you should add some markup to the header items so they can be positioned correctly.


    Matt Whiteley – WhiteleyDesigns, GitHub
    Designing, Developing & Creating with WordPress

February 16, 2015 at 11:51 am #141031
defree99
Participant

The menu works great, thanks!

I made the adjustments to the header, but I can't seem to get the who;e thing to float right.

I'm trying to get the social media icons to right-justify.

Can you see what I might have done wrong?

February 16, 2015 at 11:58 am #141032
WhiteleyDesigns
Member

You almost have it - you just need to right-align the text in the new 'right' div you created. So the css on that div should be:

.right {
     width: 400px;
     float: right;
     text-align: right;
}

You'll want to make sure you edit the fixed pixel width objects to percentages when doing media queries to ensure it renders properly across smaller devices.


Matt Whiteley – WhiteleyDesigns, GitHub
Designing, Developing & Creating with WordPress

February 17, 2015 at 2:28 pm #141136
defree99
Participant

Perfect.

Thanks for everything!

Last quick question:

1) I edited the fixed pixel width objects to percentages, so it renders properly across smaller devices and it looks fine.

2) But is there a way to make my wrapper an "if then" kind of wrapper?

3) So that on desktops the whole thing displays on a single line. But on smartphones/tablets, the Right Div wraps down to the line below the Left DIV?

February 19, 2015 at 4:45 pm #141377
WhiteleyDesigns
Member

You would want to use media queries for that:

http://www.w3schools.com/cssref/css3_pr_mediaquery.asp

Basically, you apply different CSS inside each media query. Each media query describes a different element, such as screen size, screen type, device orientation. In simplest for you could use something like this:

@media (max-width: 499px) {
p {
     font-size: 12px;
}
}

That would simply change the paragraph font size to 12px on any screens once the width goes under 500px, but would remain the normal font size you have set on anything over 499px. Hope that helps!

Matt


Matt Whiteley – WhiteleyDesigns, GitHub
Designing, Developing & Creating with WordPress

  • Author
    Posts
  • Viewing 6 posts - 1 through 6 (of 6 total)
    • The forum ‘General Discussion’ 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