Tagged: CSS, custom elements
-
AuthorPosts
-
May 16, 2023 at 2:31 pm #1407620
Hi, we are trying to add custom components (free tools) to some pages, and we are facing some issues with css integration. We want to know is it possible to add some custom css libraries and not affect other styles. And if it is possible can you please provide solution?
May 17, 2023 at 4:52 am #1407690Hey menainfosec,
Thank you for the inquiry.
You should be able to register and enqueue custom stylesheets without affecting the theme, as long as they don’t contain CSS rules that conflict with existing styles. To register a new stylesheet, you can use the following function:
// https://developer.wordpress.org/reference/functions/wp_enqueue_style/
By following this approach, you can maintain a separate stylesheet for your custom styles without interfering with the existing theme styles, as long as there are no conflicting CSS rules.
Remember to place this code in your theme’s functions.php file or within a custom plugin to ensure it is properly executed.
If you encounter any issues or conflicts, please review your custom stylesheet and ensure there are no conflicting CSS rules. It’s good practice to use unique and specific class names or IDs to avoid clashes with the theme’s styles.
Best regards,
IsmaelMay 17, 2023 at 11:01 am #1407733Hello Ismael,
The problem we are facing that we are using some libraries that are affecting the styling on other pages.Some of the libraries we use:
Bootstrap
Bootstrap-switch
Toastr
Metronic
Fontawesome
Flaticon
Tagify
line-awesomeWe have noticed that some of these library styles have higher priority than enfold styles. We faced the issue the same way you suggested.
Is there any other way to add libraries, without affecting enfold styles?May 18, 2023 at 3:22 pm #1407845Please help us
May 19, 2023 at 3:31 am #1407901Hi,
You may need to consider hiring a freelance developer to trace and resolve any conflicts that arise. Bootstrap is a comprehensive library, and there is a significant chance that it may affect the style and layout of elements on your website. It is commonly used as a foundational style for starter or blank templates.
A skilled freelance developer can assist in identifying the conflicts and implementing appropriate solutions to ensure that the desired style and layout are maintained while using Bootstrap. They can help customize and fine-tune Bootstrap to align with your specific requirements.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.