• I want to change 2 specific buttons on my bar from the default black, to 2 different colors (1 blue, 1 yellow), leaving the rest of the buttons black. What would be the code to do this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator t-p

    (@t-p)

    IF I understand your question right and I assuming you are using Twenty Ten default theme, try playing with clor in these in style.css

    #access ul ul a {
    background: #333;
    line-height: 1em;
    padding: 10px;
    width: 160px;
    height: auto;
    }
    #access li:hover > a,
    #access ul ul :hover > a {
    background: #333;
    color: #fff;
    }

    each menu button has a unique css class/id which you can use in style.css to define the color.

    which this css class/id is depends on your setup;
    if you look into the html code in the browser, you should be able to find these classes/ids:
    example:

    <li id="menu-item-70" class="menu-item menu-item-type-post_type"><a href="https://yoursiteurl.com/grid/">Grid</a></li>

    the style to use for this would be:
    #menu-item-70 { background:red; }

    if you like to get some more specific help, you could post a link to your site.

    Thread Starter dagenius

    (@dagenius)

    ok thanks to alchymyth, i got it to work. Now ive been playing with the css all day to do one more little thing, but i cant get it to work. Im trying to place a border around each button in the menu bar so that the buttons are more visible.

    i put:

    border: 2px;
    border-color: #fff;

    in quite a few places directly related to the nav bar, but none of them work. How do i get this thing to work correctly?

    you could try to use this style:

    #access .menu-header li,
    div.menu li {
    	float: left;
    	position: relative;
    }

    maybe change it to:

    #access .menu-header li,
    div.menu li {
    	float: left;
    	position: relative;
    border:2px solid #fff;
    margin-left:-2px;
    }

    the margin-left prevents double thick lines between nav tabs.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘TwentyTen- How to change color of 2 buttons only on nav bar’ is closed to new replies.