{"id":16581,"date":"2011-02-16T18:24:15","date_gmt":"2011-02-16T23:24:15","guid":{"rendered":"https:\/\/friendburst.com\/blog-new\/16581\/sfbpc-css-explained\/"},"modified":"2011-02-16T18:24:15","modified_gmt":"2011-02-16T23:24:15","slug":"sfbpc-css-explained","status":"publish","type":"post","link":"https:\/\/friendburst.com\/blog-new\/16581\/sfbpc-css-explained\/","title":{"rendered":"SFBPC &#8211; CSS Explained"},"content":{"rendered":"<table style=\"margin-bottom: 30px;border: 1px solid #333333;width: 920px\">\n<tbody>\n<tr>\n<td width=\"200\" valign=\"top\">\n<div style=\"padding: 0pt 5px 25px 0pt;width: 200px;height: auto;margin-left: 3px;color: #000000;font-family: arial;font-size: 14px;background-color: #999999;border: 1px solid #000000\">\n<p><span><a href=\"http:\/\/www.friendburst.com\/blog\/16382\/sfbpc\/\"> \u00ab Index<\/a><\/span><\/p>\n<p><span style=\"margin-left: 30px;color: #000000;font-size: 12px;font-weight: bold\">CSS<\/span><\/p>\n<\/div>\n<\/td>\n<td width=\"725\" valign=\"top\">\n<div style=\"padding: 0pt 5px;width: 97%;height: auto;margin-left: 5px;font-family: arial;font-size: 14px;background-color: #999999;border: 1px solid #000000\">\n<p><span style=\"margin-left: 0;color: #ffffff;font-size: 15px;font-weight: bold\">CSS (Cascading Style Sheet)<\/span><\/p>\n<p><img decoding=\"async\" style=\"margin-left: 10px;border: none\" src=\"http:\/\/www.friendburst.com\/images\/profile1\/sfbpc\/css-rule.png\" alt=\"CSS\" \/><\/p>\n<p><strong>This is a brief explanation of how CSS works.<\/strong><\/p>\n<div style=\"margin: 10px 0px 25px 25px;padding: 5px;width: 90%;height: auto;color: white;font-family: arial;font-size: 14px;background-color: #999999\">\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">A CSS rule has two main parts: a selector, and one or more declarations:<\/span><\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 18px;font-weight: bold\">.selector { property: value; }<\/span><\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">The selector is normally the HTML element that you want to style.<\/span><\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">Each declaration consists of a property and a value.<\/span><\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">The property is the style attribute you want to change.<\/span><\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">Each property has a value.<\/span><\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">Example:<\/span><\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">To change the existing link color, the CSS targets the link HTML element. The HTML tag for a link is &#8220;a&#8221; (stands for anchor). This tag is referred to in the CSS by calling on that tag in the form of what is called a selector. So, to change the color of the links the CSS rule would normally appear as this:<\/span><\/p>\n<p>a {<br \/>\ncolor: #ffffff;<br \/>\n}<\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">#ffffff is the hex code for white, so the above rule would make all the links white.<\/span><\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">&#8220;a&#8221; is the selector, &#8220;color&#8221; is the property, &#8220;#ffffff&#8221; is the value.<\/span><\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">CSS always follows this same &#8220;rule&#8221;. Another example:<\/span><\/p>\n<p>body {<br \/>\nbackground-color: #000000;<br \/>\n}<\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">The above rule would make the page background black.<\/span><\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">Sometimes it is necessary to use either a more, or less specific selector. Example:<\/span><\/p>\n<p>div.block a {<br \/>\ncolor: #ffffff;<br \/>\n}<\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">The above rule only targets the block links.<\/span><\/p>\n<p>* {<br \/>\ncolor: #ffffff;<br \/>\n}<\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">The above rule targets all text, including links. Notice the selector. An asterisk can be used as a selector to target all elements.<\/span><\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">It may be necessary to override default styles. In this case, adding &#8220;!important&#8221; to the value will usually work. Example:<\/span><\/p>\n<p>a {<br \/>\ncolor: #ffffff !important;<br \/>\n}<\/p>\n<p><span style=\"margin-left: 0;color: #000000;font-size: 13px;font-weight: bold\">CSS looks difficult at first, but once you get used to the structure, and the meaning of the properties and values, it is quite easy.<\/span><\/p>\n<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u00ab Index CSS CSS (Cascading Style Sheet) This is a brief explanation of how CSS works. A CSS rule has two main parts: a selector, and one or more declarations: .selector { property: value; } The selector is normally the HTML element that you want to style. Each declaration consists of a property and a [&hellip;]<\/p>\n","protected":false},"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-16581","post","type-post","status-publish","format-standard","hentry","category-other"],"_links":{"self":[{"href":"https:\/\/friendburst.com\/blog-new\/wp-json\/wp\/v2\/posts\/16581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/friendburst.com\/blog-new\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/friendburst.com\/blog-new\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/friendburst.com\/blog-new\/wp-json\/wp\/v2\/comments?post=16581"}],"version-history":[{"count":0,"href":"https:\/\/friendburst.com\/blog-new\/wp-json\/wp\/v2\/posts\/16581\/revisions"}],"wp:attachment":[{"href":"https:\/\/friendburst.com\/blog-new\/wp-json\/wp\/v2\/media?parent=16581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/friendburst.com\/blog-new\/wp-json\/wp\/v2\/categories?post=16581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/friendburst.com\/blog-new\/wp-json\/wp\/v2\/tags?post=16581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}