Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #704643

    Hello,

    I have created a text box with a custom class pyb-text-box

    I want to style all the header tags within it using this code

    .pyb-text-box h2{
    font-family: “abolition”, !important;
    }

    But it is not working. I know I have the typekit set up to work properly, and I have done this before on my other site, but I can’t get it operating right here. I feel like I am missing something very obvious…:) Any help would be a lifesaver. Thank you!

    #704754

    Hey tonyska,

    Please try removing the comma from your code. Please verify that your font is working as it should as well.

    Best regards,
    Rikard

    #704890

    Hi Rikard! Thanks for the fast response. I have verified that the font is working, but removing the comma didn’t work.

    I set up a test page and used a custom class to test it out. So everything seems to work on my test page, but not on the PYB page. Can’t tell what I’m doing wrong there. I feel like something is overriding it in the CSS?

    #705171

    Hi,

    Your custom class is not there, that is why your code is not working. This code is working when I try it with the Chrome inspector:

    h2 {
        font-family: 'abolition' !important;
    }

    Best regards,
    Rikard

    #705344

    But it *is* there…I enclosed links to screenshots below.

    The custom class is applied to that text box, and the custom class has been entered into my custom CSS. Has been from the beginning, unless I am overlooking something very obvious…:)

    Thanks again!

    #706537

    Hi,

    It’s not on the protect your butt page, that is where it’s not working right? You can see that it’s not there if you inspect the page in your browser and search the source code for pyb-text-box.

    Best regards,
    Rikard

    #706732

    The styling is in there, it’s in the editor, it’s in the CSS. You can see it in the screenshots.

    It’s pyb-text-block, not box, which is maybe why you’re not finding it.

    I am going to try and figure this out on my own at this point, if you have any suggestions that would be great. thank you!

    • This reply was modified 8 years ago by tonyska.
    #706987

    Hi,

    Ok, but then you need to change your CSS:

    .pyb-text-block h2 {
      /* your code */
    }

    For instance :-)

    Best regards,
    Rikard

    #707125

    I don’t think you understood my problem, or what I was saying in my replies…:)

    But thanks for the quick responses!

    #707129

    Hey!

    I understood what Rikard understood and from what we understood, it is working fine :) Please see the screenshot in private content field.
    If we still did not understand you correctly, please elaborate. As always, we would love to help :)

    Best regards,
    Yigit

    #707141

    Hi Yigit,

    Looking back I see that I miscommunicated the problem. Apologies, Rikard, you had it right :)

    It seems to have resolved itself and thank you once again for all your responsiveness and help!

    #707143

    Hey!

    You are welcome, glad it is working fine now :)
    Let us know if you have any other questions or issues!

    Cheers!
    Yigit

    #709602

    This one seems to have returned. I am trying to style the h2, h3, and strong tags. I have made what I think are the right changes to the CSS. But in the inspector, the changes are not there, and it seems like the h2 and h3 tags are overridden. I enclosed screen shots of the CSS and then the source so you can see that not all of the stylings are appearing in the source. Is this a caching issue?

    Any advise would appreciated! Thank you!

    #710548

    Hi!

    I logged in to the site but I can’t access the file editor. Please set the user role to “administrator” so that we can check the css codes.

    Regards,
    Ismael

    #710757

    done! try now.

    thank you!!!

    #711788

    Hey!

    There’s a css declaration in the style.css file that overrides the modification. We moved it above the “pyb-text-block” css modification.

    h1,h2,h3,h4,h5,h6{
    	font-family: "proxima-nova", helvetica, sans-serif;
    	text-transform: none !important;
    	letter-spacing:0px !important;
    }

    Best regards,
    Ismael

    #719483

    Hi guys,
    Still seem to be having this problem with the h2 tags, the styling has changed at all, still locked in at 28px with that color.
    Here is the code I am trying to change them to:

    .pyb-text-block h2 {
    	font-family: "abolition" !important;
    	font-size:48px !important;
    	color:#005CA9 !important;
    	text-transform:none !important;
    	letter-spacing:1px !important;
    }

    But it seems to be completely ignored.

    I am also trying to change the color of “strong” tags, but that is ignored as well.

    Also, to reduce the margin on the bottom of the text boxes, as you can see after “Please Do the Following” and after the “Tell Your Story” section, there is a lot of white space after them. How can I close those up? I have tried numerous CSS modifications but they all seem to go ignored. What am I doing wrong? Sorry to bother you with this!!! I thought I understood CSS but this has me beat! :)

    #719955

    Hi,

    I checked it and it’s not ignored though I see a different code taking effect, which is this:

    .page-id-916 .pyb-text-block h2 {
        font-family: "abolition"!important;
        font-size: 36px!important;
        text-transform: none!important;
        letter-spacing: 1px!important;
    }

    You can add margin-bottom: 0; after letter-spacing, to reduce the space after it. Also you have define blue color for strong, this is the code and it works well:

    .pyb-text-block strong {
        color: #118acb!important;
    }

    Hope this helps.

    Best regards,
    Nikko

    #720059

    Hi Nikko,

    This is very weird. I can’t find that code with the 36px in my CSS. Is it cached, maybe?
    I didn’t find it in the inspector, either. Do you have any tips? I’m at a loss here…:)

    Thank you so much again!

    #720443

    Hi,

    This is what I see on my end: http://imgur.com/a/rhMy7\
    Hope this helps.

    Regards,
    Nikko

    #720692

    I had my hosting service go in to see if it was a caching error and this is what they said…

    Tell the theme developer to look at line 288 of file functions.php of the enfold theme:
    wp_register_style( 'avia-style' , $child_theme_url."/style.css", array(), '2', 'all' );

    It’s hard coded to tell WordPress to use version 2 of style.css

    I changed it so there’s no versioning as I didn’t see any code in the child theme to setup CSS versions:
    wp_register_style( 'avia-style' , $child_theme_url."/style.css");

    is this helpful? thanks!

    #720755

    Hi,

    Can you provide ftp access so we can check your files? and see where it is located.

    Regards,
    Nikko

    #721160

    see below

    #721438

    Hey!

    I checked your site and I don’t see what I have mentioned before and can see this taking effect:

    .pyb-text-block h2 {
    	font-family: "abolition" !important;
    	font-size:48px !important;
    	color:#005CA9 !important;
    	text-transform:none !important;
    	letter-spacing:1px !important;
    }

    I think it’s already good now, let us know if there’s anything else you need help regarding this topic.

    Regards,
    Nikko

    #721601

    Hi Nikko,

    It’s working I think because my tech guy found something in the functions.php that was telling the theme to use the wrong CSS…it was reply #720692

    Any idea why the functions.php was telling it to do that? Kinda weird, no?

    Very interesting! At the very least makes me feel like I’m not so crazy!!!

    Thanks again for all your help!

    :)

    • This reply was modified 7 years, 11 months ago by tonyska.
    #721706

    Hi,

    You’re very much welcome. Glad that it’s fixed :)
    Regards,
    Nikko

Viewing 26 posts - 1 through 26 (of 26 total)
  • The topic ‘Custom Class Not Working on Headers’ is closed to new replies.