Using CSS Reset in WordPress Themes

When creating a new WordPress theme from scratch or incorporating an existing theme into your WordPress site, sometimes it helps to start with the basics. And there is nothing more basic than the CSS Reset technique which aligns all your common elements to the same standards. For example, if your color scheme involves having your links be red, then you’ll want to incorporate:

a { color: #ff0000 }

That basically says that any link on the website will be red, unless otherwise coded. When users go to incorporate a custom theme into their WordPress site, it may seem obvious but many people forget to change the early reset code, and instead opt for changing things one by one. For instance, you may want your menu links to be bold, but you also want the rest of the links on the site to be bold. Instead of going to each element one by one, just set:

Join us in our newest publication:
a { font-weight: bold; }

Then, if you have certain links you want to be normal weight you can change them inidividually.

If you are creating a WordPress theme from scratch make sure to incorporate strong reset scripts, including often times in custom widgets as well as plug-ins. On top of jQuery plugins, reset scripts can align functionalities to a universal design standard. And then, users can choose to change them or not to change them.

CSS Reset scripts are the very basics of what a theme needs, but forgetting it can wind you up with Times New Roman text or poorly managed spacing.

Share and Enjoy !

0Shares
0 0