• Resolved jevans17

    (@jevans17)


    I have created a button on the navigation menu using a class created in my child style.css the button shows up fine but I cannot specify the color. instead it is an orange color
    which SEEMS to be inherited from somewhere. I have truly tried to find out where but am unable to do so.
    I am calling this class via the navigation label in the menu item home thus:
    ‘<button class=”navbtnhome”>home</button>’
    my child style.css

    /*
    Theme Name: TwentyThirteen Child
    Description: My Retrobrain child theme
    Author: John W Evans
    Version: 1.0
    Template: twentythirteen
    */

    @import url(‘../twentythirteen/style.css’);

    .main-navigation {
    clear: both;
    margin: 0 auto;
    max-width: 1080px;
    min-height: 35px;
    position: relative;
    }

    ul.nav-menu,
    div.nav-menu > ul {
    margin: 0;
    padding: 0 40px 0 0;
    }

    .nav-menu li {
    display: inline-block;
    position: relative;
    }

    .nav-menu li a {
    color: #141412;
    display: block;
    font-size: 15px;
    line-height: 1;
    padding: 15px 20px;
    text-decoration: none;
    }

    .nav-menu li:hover > a,
    .nav-menu li a:hover,
    .nav-menu li:focus > a,
    .nav-menu li a:focus {
    background-color: #220e10;
    color: #fff;
    }

    .nav-menu .sub-menu,
    .nav-menu .children {
    background-color: #220e10;
    border: 2px solid #f7f5e7;
    border-top: 0;
    padding: 0;
    position: absolute;
    left: -2px;
    z-index: 99999;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    }

    .nav-menu .sub-menu ul,
    .nav-menu .children ul {
    border-left: 0;
    left: 100%;
    top: 0;
    }

    ul.nav-menu ul a,
    .nav-menu ul ul a {
    color: #fff;
    margin: 0;
    width: 200px;
    }

    ul.nav-menu ul a:hover,
    .nav-menu ul ul a:hover,
    ul.nav-menu ul a:focus,
    .nav-menu ul ul a:focus {
    background-color: #db572f;
    }

    ul.nav-menu li:hover > ul,
    .nav-menu ul li:hover > ul,
    ul.nav-menu .focus > ul,
    .nav-menu .focus > ul {
    /*
    clip: inherit;
    overflow: inherit;
    height: inherit;
    width: inherit;
    */
    }

    .nav-menu .current_page_item > a,
    .nav-menu .current_page_ancestor > a,
    .nav-menu .current-menu-item > a,
    .nav-menu .current-menu-ancestor > a {
    color: #bc360a;
    font-style: italic;
    }

    .site-header {
    position: relative;
    }

    .site-header .home-link {
    color: #F7F5E7; /*#141412;*/
    display: block;
    margin: 0 auto;
    max-width: 1080px;
    min-height: 230px;
    padding: 0 20px;
    text-decoration: none;
    width: 100%;
    }

    .site-header .site-title:hover {
    text-decoration: underline;
    }

    .site-title {
    font-size: 60px;
    font-weight: bold;
    line-height: 1;
    margin: 0;
    padding: 58px 0 10px;
    }

    .site-description {
    font: 300 italic 24px “Source Sans Pro”, Helvetica, sans-serif;
    margin: 0;
    }

    .navbtnhome {
    margin-top: -5px;
    margin-bottom: -5px;
    background-color: #00ff00;
    color: black;
    border-color: yellow;
    border-radius: 10px;
    padding: 5px 15px 5px 15px;
    /*margin-top: 2px;*/
    }

    .navbtnhome:hover {
    margin-top: -5px;
    margin-bottom: -5px;
    background-color: #00ff00;
    color: black;
    border-color: green;
    border-radius: 10px;
    padding: 5px 15px 5px 15px;

    as you can see i’m trying to create a button color of #00ff00 but it just remains orange

    PLEASE help me – i need to know where this orange color is coming from. then I can get on with things.

    I scrapped my web-site plans and started afresh with a new canvas but this color problem persists.
    I know i must have missed something.

    forgive me for what must seem to you a very simple problem but it has stymied me for weeks.

    Thanks for reading…

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter jevans17

    (@jevans17)

    Dear Dave,

    Thanks for all your help

    in the end I didn’t try !Important as I could not see how to use it as i had removed most of the color entries in the nav menu definitions BUT you did make me think thru my problem again!
    SO I reinstated the background-color entries for #db572f & #220E10 and replaced the color with TRANSPARENT. Voila! I got what i wanted the menu buttons now sit on the page without any background black or orange panels.

    You have helped me SO much and helped me “see” a little more of how things work.

    my best regards

    A delighted John

    ??

    Thread Starter jevans17

    (@jevans17)

    oops

    SORRY Steve (not Dave)

    my previous entry was meant for you with endless superlatives

    Sorry Again

    John

    Thread Starter jevans17

    (@jevans17)

    my last apparent problem is this:

    The nav menu has a background area of about 40px’s in height – I want to reduce the height to about half this (20px) and I want every submenu item to also show in a background area of 20px too

    however after endless investigation I fail to see where the height of the background is defined
    my current child theme is at <a href=”https://codepen.io/jevans17/pen/WGkRVa&#8221;

    I know i should have found it by now but I cannot.

    I know this post is a little old but PLEASE help

    thanks for reading

    web-site https://retrobrain.co.uk

    John

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You have two issues going on:

    1. .main-navigation has a minimum height of 45px in your CSS
    2. The search box on the right has a bunch of height to it.

    Thread Starter jevans17

    (@jevans17)

    Thanks for swift reply

    I have had SOME success

    I set .main-navigation min height from 45 to 24 (pixel size of search icon)

    I altered the .site-header .search-field { height 37px to 24px

    the search field height is now 24px
    BUT
    the 40px offending #F7F5E7 background is still showing as about 40px

    i noted that you said:
    The search box on the right has a bunch of height to it.
    Have I only done half the job or is something else wrong?

    my updated current child theme is at <a href=”https://codepen.io/jevans17/pen/WGkRVa”

    thanks fgor helping

    john

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    sorry, I just don’t have the time right now…. but keep inspecting and tweaking. I think this has gone beyond “how do I” and is veering into “please fix my website for me, and when you do, I’ll find something else.” ??

    Thread Starter jevans17

    (@jevans17)

    Dear Steve,

    I fully understand your point of view. It is a bit much for me to ask you to spend so much time on my little problem.
    When I start to customize twentythirteen I had no idea how deep my feet were going to get in the treacle. I have been a bit too ambitious I think.

    Thank you ever so much for all your help and believe it or not, I have learnt a lot from you.

    I will do as you say and keep tweaking. Hopefully I will happen on where that navbar background is defined.

    I’m ready now to start producing my content as actually I will have finished with this last problem – which of course you had no way of telling.

    Thank you again Steve. You have already marked this entry as resolved – so I am done.

    I am in awe of how much time you have spent on this problem for me.

    Best regards

    John

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘twentythirteen have created a button in the navbar but unable to specify color’ is closed to new replies.