-
AuthorPosts
-
May 11, 2020 at 7:13 am #1211749
Hello there,
I have include the following in child theme style.css:
:lang(zh-hant) body { font-family:open sans,Arial,Helvetica,microsoft jhenghei,微軟正黑體,pmingliu,新細明體,hiragino sans tc,冬青黑體,sans-serif!important }
However, the below theme css always override my custom CSS of headings:
h1,h2,h3,h4,h5,h6,#top .title_container .main-title,tr.pricing-row td,#top .portfolio-title,.callout .content-area,.avia-big-box .avia-innerbox,.av-special-font,.av-current-sort-title,.html_elegant-blog #top .minor-meta,#av-burger-menu-ul li{font-family:open sans,helveticaneue,helvetica neue,helvetica-neue,Helvetica,Arial,sans-serif} body.open_sans{font-family:open sans,helveticaneue,helvetica neue,helvetica-neue,Helvetica,Arial,sans-serif}
location: HOME/wp-content/uploads/dynamic_avia/enfold_child.css
May I have any suggestion to apply custom font-family to non-English heading?
May 12, 2020 at 4:41 am #1211985Hey asiabchk,
Could you post a link to where we can see the results you are getting please?
Best regards,
RikardMay 12, 2020 at 5:13 am #1212002Thanks for your quick reply.
Take a look at the first <h1> and the following <p> below
The computed font style for these elements different:
<h1>:h1, h2, h3, h4, h5, h6, #top .title_container .main-title, tr.pricing-row td, #top .portfolio-title, .callout .content-area, .avia-big-box .avia-innerbox, .av-special-font, .av-current-sort-title, .html_elegant-blog #top .minor-meta, #av-burger-menu-ul li { font-family: open sans condensed,helveticaneue,helvetica neue,helvetica-neue,Helvetica,Arial,sans-serif; }
<p>:
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; }
thus it read:
:lang(zh-hant) body { font-family: open sans,Arial,Helvetica,microsoft jhenghei,微軟正黑體,pmingliu,新細明體,hiragino sans tc,冬青黑體,sans-serif!important; }
May 13, 2020 at 4:17 am #1212463Hi,
Thanks for that. Please try something like this in Quick CSS in order to target the h1 header for the specific language:
html[lang="zh-hant"] h1 { font-family:open sans,Arial,Helvetica,microsoft jhenghei,微軟正黑體,pmingliu,新細明體,hiragino sans tc,冬青黑體,sans-serif !important; }
Best regards,
RikardMay 14, 2020 at 4:00 am #1212820Thanks for help, Rikard.
Your CSS can change H1 tag of ALB special headings.
Furthermore, I found that if I change the CSS selector to :
:lang(zh-hant) body h1
It can’t override the Theme font setting even I have added !important;
P.S. It’s time for me to go deeper about CSS selector priority.
— case closed —
May 15, 2020 at 7:12 am #1213140 -
AuthorPosts
- The topic ‘Change font-family of heading for non-English’ is closed to new replies.