{"id":47236,"date":"2014-02-10T14:24:56","date_gmt":"2014-02-10T13:24:56","guid":{"rendered":"http:\/\/www.elmastudio.de\/?p=47236"},"modified":"2016-05-16T22:43:28","modified_gmt":"2016-05-16T20:43:28","slug":"custom-css-wordpress","status":"publish","type":"post","link":"https:\/\/www.elmastudio.de\/en\/custom-css-wordpress\/","title":{"rendered":"How to Use Custom CSS in WordPress"},"content":{"rendered":"<p>Sometimes you want to customize your WordPress theme a little bit, like changing a font color or a font style. If these theme changes are not possible in the theme by default, you can use custom CSS to overwrite or add new CSS properties to the theme styles. And how does it work? First you should already know some basic CSS. But then customizing your theme and adding your own CSS styles is really not too difficult and you have three different options to include your custom CSS. You can use a simple WordPress plugin like <a href=\"http:\/\/wordpress.org\/plugins\/simple-custom-css\/\" title=\"Simple Custom CSS\">Simple Custom CSS<\/a> or <a href=\"http:\/\/wordpress.org\/plugins\/my-custom-css\/\" title=\"My Custom CSS\">My Custom CSS<\/a>.<\/p>\n<p>In case you already use the Jetpack plugin you will not need to add an additional plugin, since Jetpack comes with its own Custom CSS feature. Just activate the Custom CSS feature in Jetpack and start adding your CSS under <em>Appearance  \u2192 Edit CSS<\/em>. A lot of WordPress Premium themes also offer their own Custom CSS option on the theme options page or in the Customizer, so you won\u2019t need to install an extra plugin for your Custom CSS at all. One disadvantage here is, that the CSS is dependent on the theme and will be lost, if you change the theme.<\/p>\n<p>Finally you can also create a child theme and add your CSS to the child themes style.css file. Using a child theme is especially useful, if you plan to add more changes to the theme, like customizing theme template files or overwriting or adding additional functions in your own functions.php file. <!--more--><\/p>\n<h3>WordPress Plugins for Your Custom CSS<\/h3>\n<h4>Simple Custom CSS<\/h4>\n<p>At the moment my favorite plugin for CSS customizations is <a href=\"http:\/\/wordpress.org\/plugins\/simple-custom-css\/\" title=\"Simple Custom CSS\">Simple Custom CSS<\/a>. The plugin is really easy to use. You will find the new menu button <strong>&#8220;Custom CSS&#8221;<\/strong> under Appearance. Here you can start to add your custom CSS styles.<\/p>\n<figure id=\"attachment_47241\" aria-describedby=\"caption-attachment-47241\" style=\"width: 720px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/simple-custom-css.jpg\" alt=\"Simple Custom CSS in the WordPress admin panel.\" width=\"720\" height=\"421\" class=\"size-full wp-image-47241 img-border\" srcset=\"https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/simple-custom-css.jpg 720w, https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/simple-custom-css-600x351.jpg 600w, https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/simple-custom-css-150x88.jpg 150w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><figcaption id=\"caption-attachment-47241\" class=\"wp-caption-text\">Simple Custom CSS in the WordPress admin panel.<\/figcaption><\/figure>\n<p>After saving your new CSS you can check your changes in the browser.<\/p>\n<figure id=\"attachment_47050\" aria-describedby=\"caption-attachment-47050\" style=\"width: 720px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/simple-custom-css-frontend.jpg\" alt=\"Testing your changes in the browser.\" width=\"720\" height=\"403\" class=\"size-full wp-image-47050 img-border\" srcset=\"https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/simple-custom-css-frontend.jpg 720w, https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/simple-custom-css-frontend-600x336.jpg 600w, https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/simple-custom-css-frontend-150x84.jpg 150w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><figcaption id=\"caption-attachment-47050\" class=\"wp-caption-text\">Testing your changes in the browser.<\/figcaption><\/figure>\n<h4>Finding the Right CSS Properties in Your Theme<\/h4>\n<p>If you\u2019re not sure which CSS property to customize in your theme in order to achieve your desired changes, you can use browser developer tools such as the &#8221; Inspect Element&#8221; (e.g. in Firefox or Chrome) or browser Add-ons like Firebug (for Safari, Chrome and Firefox).<\/p>\n<figure id=\"attachment_47053\" aria-describedby=\"caption-attachment-47053\" style=\"width: 720px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/css-untersuchen-browser.jpg\" alt=\"Die Element untersuchen-Funktion im Chrome-Browser.\" width=\"720\" height=\"394\" class=\"size-full wp-image-47053 img-border\" srcset=\"https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/css-untersuchen-browser.jpg 720w, https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/css-untersuchen-browser-600x328.jpg 600w, https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/css-untersuchen-browser-150x82.jpg 150w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><figcaption id=\"caption-attachment-47053\" class=\"wp-caption-text\">Die Element untersuchen-Funktion im Chrome-Browser.<\/figcaption><\/figure>\n<p>Here you can find more detailed information on how to use the <a href=\"https:\/\/developers.google.com\/chrome-developer-tools\/\" title=\"Browser Dev Tools Google Chrome\">browser dev tools for Chrome<\/a> or <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/firebug\/\" title=\"Firebug for Firefox\">Firebug for Firefox<\/a>.<\/p>\n<h4>Use !important<\/h4>\n<p>Since your new CSS rules will overwrite the themes CSS properties by default, in most cases you won\u2019t need to add the <strong>!important<\/strong> rule. If a CSS property can not be changed, you can use <strong>!important<\/strong>. like in the following example:<\/p>\n<p>[code]<br \/>\n.entry-details {<br \/>\ntext-transform: none !important;<br \/>\n}<br \/>\n[\/code]<\/p>\n<h4>Jetpacks Custom CSS Feature<\/h4>\n<p>In case you have already installed the Jetpack plugin, you should use the <a href=\"http:\/\/jetpack.me\/support\/custom-css\/\" title=\"Jetpack Custom CSS\">Jetpack Custom CSS feature<\/a> to add your CSS. After activating Custom CSS in Jetpacks plugin settings, you can start writing your CSS under <em>Appearance \u2192 Edit CSS<\/em>. <\/p>\n<p>This way you will not have to install any additional plugins. Jetpacks Custom CSS also offers &#8220;CSS Revisions&#8221; as a nice additional feature. With CSS revisions you can  easily compare the changes you made and also go back to previous versions of your Custom CSS in case anything went wrong (it works the same  way as post revisions).<\/p>\n<figure id=\"attachment_47243\" aria-describedby=\"caption-attachment-47243\" style=\"width: 720px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/jetpack-css-revisions.jpg\" alt=\"Use CSS Revisions with Jetpack Custom CSS.\" width=\"720\" height=\"272\" class=\"size-full wp-image-47243 img-border\" srcset=\"https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/jetpack-css-revisions.jpg 720w, https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/jetpack-css-revisions-600x227.jpg 600w, https:\/\/www.elmastudio.de\/wp-content\/uploads\/2014\/02\/jetpack-css-revisions-150x57.jpg 150w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><figcaption id=\"caption-attachment-47243\" class=\"wp-caption-text\">Use CSS Revisions with Jetpack Custom CSS.<\/figcaption><\/figure>\n<h3>Use Custom CSS in the Theme Options<\/h3>\n<p>Many Premium themes will offer you the possibility to add Custom CSS right on the theme options page with the advantage of not having to install an extra plugin for your CSS changes. But you should be aware that your custom CSS then depends on the theme and will not be available any more, after you decide to change the theme. So you should use this option for CSS changes of your current theme only.<\/p>\n<h3>Add custom CSS to a Child Theme<\/h3>\n<p>If you already have some experiences in customizing or developing a WordPress theme and you plan to add more advances changes, creating your own child theme is a good solution. With a child theme all your changes will be saved, even if you update your parent theme. You can find more information on creating a child theme in the post <a href=\"http:\/\/themeshaper.com\/2009\/04\/17\/wordpress-child-theme-basics\/\" title=\"WordPress Child Theme Basics\">&#8220;WordPress Child Theme Basics&#8221;<\/a> on the ThemeShaper blog.<\/p>\n<p>Now all changes in your CSS can be added directly to the child themes <strong>style.css<\/strong> file. This way you will always have all your customization in one place and you don\u2019t need to install any additional plugins.<\/p>\n<h4>Your Feedback<\/h4>\n<p>What plugins and tools do you find useful to integrate custom CSS in a WordPress theme? What experiences and tips can you share adding custom CSS in WordPress? I\u2019m looking forward to hear your opinion and insights on the topic!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you want to customize your WordPress theme a little bit, like changing a font color or a font style. If these theme changes are not possible in the theme by default, you can use custom CSS to overwrite or add new CSS properties to the theme styles. And how does it work? First you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":107942,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"footnotes":""},"categories":[910,1247],"tags":[1044,1257,1077,1182],"class_list":["post-47236","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-wordpress-en","category-wordpress-newbies","tag-custom-css","tag-featured","tag-jetpack-en-2","tag-plugins","post_format-post-format-image"],"_links":{"self":[{"href":"https:\/\/www.elmastudio.de\/en\/wp-json\/wp\/v2\/posts\/47236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.elmastudio.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elmastudio.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elmastudio.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elmastudio.de\/en\/wp-json\/wp\/v2\/comments?post=47236"}],"version-history":[{"count":0,"href":"https:\/\/www.elmastudio.de\/en\/wp-json\/wp\/v2\/posts\/47236\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.elmastudio.de\/en\/wp-json\/wp\/v2\/media\/107942"}],"wp:attachment":[{"href":"https:\/\/www.elmastudio.de\/en\/wp-json\/wp\/v2\/media?parent=47236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elmastudio.de\/en\/wp-json\/wp\/v2\/categories?post=47236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elmastudio.de\/en\/wp-json\/wp\/v2\/tags?post=47236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}