{"id":13944,"date":"2015-04-06T05:02:43","date_gmt":"2015-04-05T19:02:43","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=13944"},"modified":"2015-04-06T05:02:43","modified_gmt":"2015-04-05T19:02:43","slug":"css-body-border-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/css-body-border-primer-tutorial\/","title":{"rendered":"CSS Body Border Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/Body_Border.png\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"CSS Body Border Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/Body_Border.png\" title=\"CSS Body Border Primer Tutorial\" id='ibbcss' onmouseover=\" this.src=this.src.replace('.jpg', '.xpng').replace('.png', '.xjpg').replace('.x', '.');   \" \/><\/a><p class=\"wp-caption-text\">CSS Body Border Primer Tutorial<\/p><\/div>\n<p>The CSS we show today, thanks in huge part to the excellent advice of this wonderful <a target=_blank href='https:\/\/css-tricks.com\/body-border\/' title='Useful link'>link<\/a>, is both about putting a border around the <i>body<\/i> of a web page (even though we never, once, refer to the &#8220;body&#8221; element as such) and also an exercise in conditional CSS.<\/p>\n<p>So what is &#8220;conditional CSS&#8221;?  We talk about it here as the way in CSS you can differentiate between the mobile platforms and the non-mobile platforms, and in today&#8217;s case, also, the difference between Internet Explorer versions before 6, and the rest.   Life in the CSS world can be quite complex if you try to cater for lots of platforms, but the Internet and the search engines are here to help &#8230; we got onto our useful link via the Google search &#8230;<\/p>\n<blockquote><p>\n<a target=_blank title='Useful Google search' href='https:\/\/www.google.com.au\/?gfe_rd=cr&#038;ei=R0ogVe7WA83u8wf064HYDg&#038;gws_rd=ssl#q=%22warm+glowing+body+border%22+css'>https:\/\/www.google.com.au\/?gfe_rd=cr&#038;ei=R0ogVe7WA83u8wf064HYDg&#038;gws_rd=ssl#q=%22warm+glowing+body+border%22+css<\/a>\n<\/p><\/blockquote>\n<p>Today we show the basic CSS work involved, and tomorrow we show some once a day Linux Crontab Curl &#8220;smarts&#8221; for a bit of variety regarding this (with <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=13953' title='CSS Body Border Linux Crontab Curl Tutorial'>CSS Body Border Linux Crontab Curl Tutorial<\/a>), which involves the use of external CSS files, via the header.php changes (number 1 below) outlined below being reduced to the simple (between &lt;head&gt; and &lt;\/head&gt;) &#8230;<br \/>\n<code><br \/>\n&lt;link rel='stylesheet' type='text\/css' href='\/\/www.rjmprogramming.com.au\/HTMLCSS\/body_border.css' \/&gt;<br \/>\n<\/code><\/p>\n<p>So let&#8217;s look at how the WordPress &#8220;good &#8216;ol&#8221; header.php changed for this, in its first principles, in <b>bold<\/b> as two sections &#8230;<\/p>\n<ol>\n<li> &#8230; around the &#8220;style&#8221; bits (and like it says, thanks to this very useful <a target=_blank href='https:\/\/css-tricks.com\/body-border\/' title='Useful link'>link<\/a>) &#8230;<br \/>\n<code><br \/>\n&lt;style&gt;<br \/>\n<b><br \/>\n#btop, #bbottom, #bleft, #bright {  \/* thanks to https:\/\/css-tricks.com\/body-border\/ *\/<br \/>\n\tbackground: gold; \/* #a5ebff; *\/<br \/>\n\tposition: fixed;<br \/>\n\t}<br \/>\n\t#bleft, #bright {<br \/>\n\t\ttop: 0; bottom: 0;<br \/>\n\t\twidth: 5px; \/* 15px; *\/<br \/>\n\t\t}<br \/>\n\t\t#bleft { left: 0; }<br \/>\n\t\t#bright { right: 0; }<br \/>\n\t#btop, #bbottom {<br \/>\n\t\tleft: 0; right: 0;<br \/>\n\t\theight: 5px; \/* 15px; *\/<br \/>\n\t\t}<br \/>\n\t\t#btop { top: 0; }<br \/>\n\t\t#bbottom { bottom: 0; }<br \/>\n&lt;\/style&gt;<br \/>\n&lt;!--[if lte IE 6]&gt;<br \/>\n\t&lt;style&gt;#btop, #bbottom, #bleft, #bright { display: none; }&lt;\/style&gt;<br \/>\n&lt;![endif]--&gt;<br \/>\n&lt;style&gt;<br \/>\n@media<br \/>\n\/* Fairly small screens including iphones *\/<br \/>\nonly screen and (max-width: 500px),<br \/>\n\/* iPads *\/<br \/>\nonly screen and (min-device-width: 768px) and (max-device-width: 1024px)<br \/>\n{<br \/>\n\t#btop, #bbottom, #bleft, #bright { display: none; }<br \/>\n}<br \/>\n<\/b><br \/>\n\/* ... *\/<br \/>\n\/* ... *\/<br \/>\n\/* ... *\/<br \/>\n\/* ... *\/<br \/>\n&lt;\/style&gt;<br \/>\n<\/code>\n<\/li>\n<li> &#8230; at the end &#8230;<br \/>\n<code><br \/>\n\t&lt;\/div&gt;&lt;!-- #header --&gt;<br \/>\n<b><br \/>\n&lt;div id=\"bleft\"&gt;&lt;\/div&gt;<br \/>\n&lt;div id=\"bright\"&gt;&lt;\/div&gt;<br \/>\n&lt;div id=\"btop\"&gt;&lt;\/div&gt;<br \/>\n&lt;div id=\"bbottom\"&gt;&lt;\/div&gt;<br \/>\n<\/b><br \/>\n\t&lt;div id=\"main\"&gt;<br \/>\n<\/code>\n<\/li>\n<\/ol>\n<p>Maybe you can try the leads that these ideas could give you regarding a small &#8220;makeover&#8221; to your webpages.<\/p>\n<p><b><i>Did you know?<\/i><\/b><\/p>\n<p>The investigations and analysis of HTML required by this &#8220;DIY&#8221; HTML\/CSS were facilitated by the use of the <a target=_blank href='http:\/\/www.mozilla.org\/en-US\/firefox\/new\/' title='Firefox home page'>Firefox<\/a> web browser and a very useful add-on called <a target=_blank title='Firebug home page' href='https:\/\/getfirebug.com\/'>Firebug<\/a> which you may want more information about <a target=_blank title='Firebug tutorials at this blog' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Firebug'>here<\/a>, and which is commonly used to debug client-side Javascript and HTML.   As for today&#8217;s usage, Firebug is also extremely useful in deconstructing how a web page was created.   The other simple wonderful tool for this is the web browser&#8217;s equivalent menu command like View->Page Source (or sometimes equivalent of right-click Page Source).   Firebug has a sister product called <a target=_blank title='FirePHP home page' href='http:\/\/www.firephp.org\/'>FirePHP<\/a> which helps debug server-side PHP and Ajax <a target=_blank title='FirePHP tutorials at this blog' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Firephp'>work<\/a>.  Please don&#8217;t mind me &#8230; am sold on Firebug with Firefox, but there are many alternatives (eg. Safari and Inspector (built into Safari) via Develop-&gt;Show Web Inspector) &#8230; and there are others (with other web browsers).<\/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='#d13944' onclick='var dv=document.getElementById(\"d13944\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=CSS\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d13944' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The CSS we show today, thanks in huge part to the excellent advice of this wonderful link, is both about putting a border around the body of a web page (even though we never, once, refer to the &#8220;body&#8221; element &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/css-body-border-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":[155,161,281,327,438,439,576,997,1319,1456],"class_list":["post-13944","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-body","tag-border","tag-css","tag-did-you-know","tag-firebug","tag-firefox","tag-html","tag-programming","tag-tutorial","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/13944"}],"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=13944"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/13944\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=13944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=13944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=13944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}