• Hello,

    I am having trouble changing font-weight using the following CSS for menu items. What am I doing wrong? Everything else works fine. Thanks in advance

    .onepress-menu a {
    font-family: Arial;
    font-weight: 600;
    font-size: 26px;
    text-transform: italic;
    }

    • This topic was modified 8 years, 3 months ago by Jan Dembowski.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,

    Isn’t the menu font already 600 by default?

    Maybe try 700, 800 or 900.

    If it won’t help try adding “!important” to the end of line, eg:

    font-weight: 700!important;

    TibbyWeb

    Thread Starter beachsand14

    (@beachsand14)

    @tibbyweb Hi TibbyWeb,

    I tried your above recommendation and it didn’t work. I am also able to change the font-weight in Google inspector or CSS. This is weird, right? I can’t remember the default font-weight but here is a bit more background info

    1. I downloaded a font plugin for WordPress that is using my One Press template default settings
    2. I use custom CSS as shown above for some fonts like h1

    Thanks for your help so far.

    P.S. – I use a temporary URL so I can’t share my site but I can provide screenshots if you wish. Please specify of what. Thanks

    Cheers, BJ

    • This reply was modified 8 years, 5 months ago by beachsand14.

    That could be due to “CSS Specificity”, which means that other CSS in the theme is overwriting your code. Adding “!important;” usually helps with that, but not always.

    I have to go now, but I’ll try to look at it tomorrow.

    Cheers!

    TibbyWeb

    Thread Starter beachsand14

    (@beachsand14)

    Thank you Tibby! I appreciate all your help. Take care

    Thread Starter beachsand14

    (@beachsand14)

    Sorry, I meant to say I am

      unable

    to change font-weight in Google Inspector

    • This reply was modified 8 years, 5 months ago by beachsand14.

    Hi,

    Do you still need help with that topic?

    BTW, to make the font italic use “font-style” font-style: italic; instead of “text-transform”.

    Cheers!

    TibbyWeb

    Thread Starter beachsand14

    (@beachsand14)

    Hi Tibby,

    Yes I still need help. The font-weight does not work. I will do your recommended changes.

    Cheers

    BJ

    Hi,

    I just fund this:

    “Common fonts like Arial, Helvetica, Georgia, etc. do not have weights other than 400 and 700.”

    from https://css-tricks.com/almanac/properties/f/font-weight/.

    Thus, maybe try 700?

    TibbyWeb

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Unable to change font-weight in menu text’ is closed to new replies.