-
Author
-
December 1, 2016 at 10:15 #145726airandfingersParticipant
Hi, I’m customizing the theme’s colors and layout according to my preferences, but I keep running into problems with CSS specificity.
This is because even if I copy the selectors used by responsive.css into my sweetdate-chidl/style.css, these styles are ignored since responsive.css is included later than style.css.
My current workaround is to edit the PHP files to add ID attributes and select those instead, but I’d prefer a CSS-only solution.
Is there a preferred way to include a custom CSS file that will be loaded after all other CSS files, so that it can override their styles with the same selectors?
December 4, 2016 at 13:04 #145986LauraModeratorHello, there shouldnt by any issue with css, what element are you editing ?
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
December 4, 2016 at 20:02 #146022airandfingersParticipantAs an example, we wanted to change the header color, so we tried to use the same selector, .header-bg. However, our style declaration in style.css is overridden by the theme’s inline definition with the same selector.
So, as a workaround, we added an id attribute of the same name to that element, and then used the selector #header-bg instead.
I set up an example for you to see at http://social.youtopiaproject.com… our .header-bg style (background: #08719c”) is overridden by an inline style using the same selector.
December 5, 2016 at 23:10 #146140LauraModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! ?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
December 6, 2016 at 19:50 #146230RaduModeratorHi,
It’s ok if you put your CSS selectors in wp-content/themes/sweetdate-child/style.css
If the rules are not applied specify the important declaration
Example
h1 { font-weight: bold !important; }
Let me know
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionDecember 7, 2016 at 07:48 #146309airandfingersParticipantHm, I know that I can always use !important, but I understand that it’s not a great solution.
It’d be better if style.css was loaded last in the list of stylesheets, so that even with the same selectors it’d override responsive.css and others.
December 7, 2016 at 18:15 #146354RaduModeratorNormally style.css form child it’s loaded latest… but you don’t have child theme installation from what can i see in chidl theme
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionDecember 8, 2016 at 18:54 #146455RaduModeratorHi,
I saw that the CSS from themes/kleo-child/style.css it loads thru the site if some rules not applying use !important for those.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionDecember 12, 2016 at 07:34 #146731airandfingersParticipantOkay, we’ll keep using workaround like !important and adding ID attributes then.
Cheers,
AaronDecember 12, 2016 at 18:11 #146782RaduModeratorOk then
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.