-
AuthorPosts
-
October 27, 2016 at 4:50 am #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!
October 27, 2016 at 9:41 am #704754Hey tonyska,
Please try removing the comma from your code. Please verify that your font is working as it should as well.
Best regards,
RikardOctober 27, 2016 at 3:39 pm #704890Hi 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?
October 28, 2016 at 7:35 am #705171Hi,
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,
RikardOctober 28, 2016 at 4:02 pm #705344But 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!
November 1, 2016 at 5:09 am #706537Hi,
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,
RikardNovember 1, 2016 at 2:52 pm #706732The 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.
November 2, 2016 at 7:59 am #706987Hi,
Ok, but then you need to change your CSS:
.pyb-text-block h2 { /* your code */ }
For instance :-)
Best regards,
RikardNovember 2, 2016 at 2:52 pm #707125I don’t think you understood my problem, or what I was saying in my replies…:)
But thanks for the quick responses!
November 2, 2016 at 3:01 pm #707129Hey!
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,
YigitNovember 2, 2016 at 3:20 pm #707141Hi 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!
November 2, 2016 at 3:21 pm #707143Hey!
You are welcome, glad it is working fine now :)
Let us know if you have any other questions or issues!Cheers!
YigitNovember 8, 2016 at 5:28 am #709602This 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!
November 10, 2016 at 6:55 am #710548Hi!
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,
IsmaelNovember 10, 2016 at 3:34 pm #710757done! try now.
thank you!!!
November 14, 2016 at 6:27 am #711788Hey!
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,
IsmaelDecember 2, 2016 at 4:35 am #719483Hi 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! :)
December 3, 2016 at 12:45 am #719955Hi,
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,
NikkoDecember 3, 2016 at 5:09 pm #720059Hi 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!
December 5, 2016 at 12:54 pm #720443December 5, 2016 at 9:21 pm #720692I 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!
December 6, 2016 at 12:29 am #720755Hi,
Can you provide ftp access so we can check your files? and see where it is located.
Regards,
NikkoDecember 6, 2016 at 5:52 pm #721160see below
December 7, 2016 at 12:21 pm #721438Hey!
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,
NikkoDecember 7, 2016 at 5:35 pm #721601Hi 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.
December 7, 2016 at 8:49 pm #721706Hi,
You’re very much welcome. Glad that it’s fixed :)
Regards,
Nikko -
AuthorPosts
- The topic ‘Custom Class Not Working on Headers’ is closed to new replies.