Irrespective of how widespread the use of WordPress has been, a lots of users are still making simple mistakes while writing the CSS for WordPress themes. In this article, we will take you through 6 common mistakes which we have found being made even by professional developers. Firstly, let's get a clearer view of what we mean by CSS errors in WordPress theme customization projects.
Consider a scenario where you have found your favourite WordPress theme and installed it,then after realising that it requires some small changes. Than, what you do? You simply open the custom file editor and make the changes , by hitting the 'Save' button. It's only that you realise that your website has broken down. The reason for this is the other mistake made while writing the CSS for the installed WordPress theme.
1. Choosing the incorrect selector
While tweaking the layout of your WordPress theme, there might be situations after you choose to put all of your designs in #content instead of #content-text. Doing this may not help your layout in any way. All the unwanted changes created to the theme using such an approach will be visible once the theme is being previewed. the easy fix for this is cutting and pasting these styles within the appropriate tag, in addition to deleting the styles from the #content tag.2. Incorrect template module
Often, WordPress developers tend to create modifications in the comments.php file rather than comments-popup.php file. So, even with the existence of multiple standard templates in WordPress, there are chances of messing everything. it's suggested to check the standard section you are supposed to be working on throughout your WP theme customization project.3. Forgetting important details about CSS
Despite being surprisingly creative with the CSS, there are times when developers swing to forget the bottom rules they need to follow. as an example, it's necessary for every selector to be known as an ID or class unless and until it's a HTML TAG. Plus, this selector must be set move into the format shown below:selector { property:value; property:value; }
Here, the braces, colon and semi-colon should be enclosed without fail. Missing even a single detail can create things go away. fortunately, the CSS Validators will catch up all the small details that you simply tend to forget but it's better to get it right in the 1st instance.
0 comments :
Post a Comment