{"id":15661,"date":"2015-06-29T05:01:42","date_gmt":"2015-06-28T19:01:42","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=15661"},"modified":"2015-06-28T11:39:28","modified_gmt":"2015-06-28T01:39:28","slug":"css-before-and-after-content-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/css-before-and-after-content-primer-tutorial\/","title":{"rendered":"CSS Before and After Content Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_before.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"CSS Before and After Content Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_before_after.jpg\" title=\"CSS Before and After Content Primer Tutorial\"  style=\"float:left;\" id='icbapt' onmouseover=\" this.src=this.src.replace('.jpg', '.xjpeg').replace('.gif', '.xpng').replace('.png', '.xjpg').replace('.jpeg', '.xgif').replace('.x', '.');    \"  \/><\/a><p class=\"wp-caption-text\">CSS Before and After Content Primer Tutorial<\/p><\/div>\n<p>The <a target=_blank title='Content before property information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/sel_before.asp'>&#8220;#element:before { content: &#8216;Some starting content&#8217;; }&#8221;<\/a> and  <a target=_blank title='Content after property information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_gen_content.asp'>&#8220;#element:after { content: &#8216;Some optional ending content&#8217;; }&#8221;<\/a> CSS syntax (to populate the innerHTML &#8220;content&#8221; of HTML element id=&#8217;element&#8217;) is fascinating to me, because it feels like breaking the rules somehow.  Why should CSS have that &#8220;content&#8221; fun within its means?  Mind you, to piece together the &#8216;Some content&#8217; in interesting and useful ways may require you to help the CSS out with one of &#8230;<\/p>\n<ul>\n<li>Javascript DOM (or maybe jQuery)<\/li>\n<li>PHP (or some other server-side language)<\/li>\n<\/ul>\n<p> &#8230; but have been giving you, lately, a rest from server-side PHP for two reasons &#8230;<\/p>\n<ol>\n<li>not everybody has Apache\/PHP hosting &#8230; doh!<\/li>\n<li>the web programming world&#8217;s Ajax inspired functionality has meant that you can do lots of inter-webpage communication ideas and still be using only Javascript<\/li>\n<\/ol>\n<p> &#8230; but am here to tell you, even so, that you should not underestimate what a server-side language can help you out with, with respect to file and database and validation usage, as well as the fact that those inter-webpage communication ideas are (arguably) easier to code using PHP or some other server-side language  &#8230; EOR (ie. end of rave).<\/p>\n<p>What reminded me of the &#8220;#element:before { content: &#8216;Some starting content&#8217;; }&#8221; and  &#8220;#element:after { content: &#8216;Some optional ending content&#8217;; }&#8221; CSS syntax was the writing of <a target=_blank title='Dynamic Javascript and CSS Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/dynamic-javascript-and-css-primer-tutorial\/'>Dynamic Javascript and CSS Primer Tutorial<\/a> and how this method ended up usefully contributing to <a target=_blank title='textareaidea.txt' href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/textareaidea.txt_GETME'>textareaidea.txt<\/a> as a way to force the content of an iframe body tag element.<\/p>\n<p>All this has led to some more delving into this subject area with our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_before.html\" title='Click picture'>live run<\/a> and HTML programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_before.html_GETME\" title='css_before.html'>css_before.html<\/a><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d15661' onclick='var dv=document.getElementById(\"d15661\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?tag=css\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d15661' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The &#8220;#element:before { content: &#8216;Some starting content&#8217;; }&#8221; and &#8220;#element:after { content: &#8216;Some optional ending content&#8217;; }&#8221; CSS syntax (to populate the innerHTML &#8220;content&#8221; of HTML element id=&#8217;element&#8217;) is fascinating to me, because it feels like breaking the rules somehow. &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/css-before-and-after-content-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[281,576,578,652,997,1319],"class_list":["post-15661","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-css","tag-html","tag-html5","tag-javascript","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/15661"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=15661"}],"version-history":[{"count":6,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/15661\/revisions"}],"predecessor-version":[{"id":15667,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/15661\/revisions\/15667"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=15661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=15661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=15661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}