Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change css of "nav-wrap" on front/home page only?

  • Avatar of Joe LeBeau
    Joe LeBeau
    Participant

    @joelebeau

    The title pretty much hits it on the head. I want to change the height of the nav-wrap only on the home page without it applying to every page on my site. Any help greatly appreciated! I am using a bp-default-child theme, but I copy and pasted all of the files from the Frisco theme into my child theme, so it basically is frisco with some css/php changes.
    Thanks Joe-

Viewing 6 replies - 1 through 6 (of 6 total)
  • Avatar of @mercime
    @mercime
    Keymaster

    @mercime

    @joelebeau hard to guess. site url?

    Avatar of Joe LeBeau
    Joe LeBeau
    Participant

    @joelebeau

    teen-ship.com

    Avatar of Tecca
    Tecca
    Participant

    @tecca

    Is this because you want it to be inline with the “Inspire. Act. Succeed,” headline? If so, you can do something like this:

    .nav-wrap h6 {
        position: absolute;
        margin-top: -45px;
    }

    Use “positon: relative;” if you want all of the letters to stay inside of the brown background.

    If you need to change the height of the nav-wrap only on the homepage, I think the best thing to do is to add the <style> tags in your homepage’s template and add higher priorities for your classes.

    Avatar of Joe LeBeau
    Joe LeBeau
    Participant

    @joelebeau

    Thanks for your time and feedback. The nav-wrap is located in header.php. I’m just trying to adjust the height to fit more content in the nav-wrap NOT to align the text (inspire,act…). I’m not quit sure what you mean by “add the <style> tags in your homepage‚Äôs template and add higher priorities for your classes.” Are you saying put <style> tags around <div class=”nav-wrap”>?? Sorry, I’m new to coding. Also, could I use some kind of function like this: <?php if (is_front_page) ?? I wouldn’t know what to put from there. Sorry for my lack of understanding..ha

    Avatar of Tecca
    Tecca
    Participant

    @tecca

    Ah, so that’s the reason. The if statement will work. Something like:

    <?php if(is_front_page() ) { ?>
        <style type="text/css">
            div.nav-wrap {
                height: 300px;
            }
        </style>
    <?php } ?>
    Avatar of Joe LeBeau
    Joe LeBeau
    Participant

    @joelebeau

    Ok great! It worked perfectly. Thanks Tecca, I really appreciate it.

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.