{"id":44992,"date":"2019-05-19T03:01:50","date_gmt":"2019-05-18T17:01:50","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=44992"},"modified":"2019-05-18T21:31:55","modified_gmt":"2019-05-18T11:31:55","slug":"workplace-concepts-game-horizontal-rule-reveal-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/workplace-concepts-game-horizontal-rule-reveal-tutorial\/","title":{"rendered":"Workplace Concepts Game Horizontal Rule Reveal Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplace_concepts.htm\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"Workplace Concepts Game Horizontal Rule Reveal Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplaceconceptsdetails.jpg\" title=\"Workplace Concepts Game Horizontal Rule Reveal Tutorial\"   \/><\/a><p class=\"wp-caption-text\">Workplace Concepts Game Horizontal Rule Reveal Tutorial<\/p><\/div>\n<p>Today we want to add a &#8220;reveal&#8221; feel to the previous <a title='Workplace Concepts Game Horizontal Rule Cell Tutorial' href='#wcghrct'>Workplace Concepts Game Horizontal Rule Cell Tutorial<\/a>.<\/p>\n<p>Our favourite &#8220;reveal&#8221; element combination is the team of <a target=_blank title='HTML details tag information from w3schools' href='https:\/\/www.w3schools.com\/tags\/tag_details.asp'>details<\/a> tag and its nested <a target=_blank title='HTML summary tag information from w3schools' href='https:\/\/www.w3schools.com\/tags\/tag_details.asp'>summary<\/a> tag partner.  The great thing about these two new HTML5 inclusions (which don&#8217;t work with InternetExplorer nor Microsoft Edge) are a great means to &#8220;reveal&#8221; optional functionality.  For today&#8217;s work, that is to include in an HTML iframe element a pointing to a YouTube Video search (using the <a target=_blank title='YouTube videos' href='https:\/\/www.youtube.com'>YouTube<\/a> video via its <a target=_blank title='Useful API' href='https:\/\/developers.google.com\/youtube\/iframe_api_reference'>Embedded Iframe API<\/a>) interface.<\/p>\n<p>It can even be that our Horizontal Rule element alignment is not ruined if the user closes details tags before clicking the yellow button.<\/p>\n<p>Here is <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplace_concepts.html--GETME\" title=\"workplace_concepts.htm\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplace_concepts.html--GETME\" title=\"workplace_concepts.htm\">workplace_concepts.htm<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplace_concepts.htm\" title=\"Click picture\">Workplace Concepts Game<\/a> for you to try this out for yourself.<\/p>\n<hr>\n<p id='wcghrct'>Previous relevant <a target=_blank title='Workplace Concepts Game Horizontal Rule Cell Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/workplace-concepts-game-horizontal-rule-cell-tutorial\/'>Workplace Concepts Game Horizontal Rule Cell Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplace_concepts.htm\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"Workplace Concepts Game Horizontal Rule Cell Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplaceconcepts.jpg\" title=\"Workplace Concepts Game Horizontal Rule Cell Tutorial\"   \/><\/a><p class=\"wp-caption-text\">Workplace Concepts Game Horizontal Rule Cell Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Workplace Concepts Game Primer Tutorial' href='#wcgpt'>Workplace Concepts Game Primer Tutorial<\/a> used &#8230;<\/p>\n<ul>\n<li>an HTML table &#8230; with &#8230;<\/li>\n<li>one static row of 4 column &#8220;header cells&#8221; &#8230; and &#8230; one static Next button row &#8230; and &#8230;<\/li>\n<li>one dynamic row of 4 column &#8220;data cells&#8221; updated with our Workplace Concept user controlled information<\/li>\n<\/ul>\n<p> &#8230; a turn in a game (user) &#8220;go&#8221; separated by 4 &#8220;data cell&#8221; positioned &#8220;Horizontal Rule&#8221; (hr) elements.<\/p>\n<p>The trouble with this insistence on the <i>one dynamic row of 4 column &#8220;data cells&#8221;<\/i> is that unless the programmer is careful the Horizontal Rules will be ragged in their &#8220;top&#8221; positioning.  This scenario remains the &#8220;Ragged Horizontal Rules can Happen&#8221; of the &#8230;<\/p>\n<ul>\n<li>New Table Row<\/li>\n<li>Blank Lines before Horizontal Rules across All Columns<\/li>\n<li>Ragged Horizontal Rules can Happen<\/li>\n<li>Margin Top to Horizontal Rules<\/li>\n<li>Light Green Padding Top to Horizontal Rules<\/li>\n<li>Absolutely Positioning Invisible Horizontal Rules<\/li>\n<li>Absolutely Positioning Visible Horizontal Rules<\/li>\n<\/ul>\n<p> &#8230; set of new &#8220;separation of go&#8221; methodologies we have for you to try in today&#8217;s incarnation of <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplace_concepts.html-GETME\" title=\"workplace_concepts.htm\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplace_concepts.html-GETME\" title=\"workplace_concepts.htm\">workplace_concepts.htm<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplace_concepts.htm\" title=\"Click picture\">Workplace Concepts Game<\/a>. <\/p>\n<p>All bar that &#8220;New Table Row&#8221; methodology perseveres with <i>one dynamic row of 4 column &#8220;data cells&#8221;<\/i> thoughts.  Of course, this &#8220;new row&#8221; idea may seem the more obvious way to go, but the slightly less imposing Horizontal Rule element has always been a favourite of mine, and can still be worked not to have that annoying raggedness in that variety of ideas of the list above &#8230; as per &#8230;<\/p>\n<ul>\n<li>New Table Row &#8230; loses (hr) raggedness with a new row created each go<\/li>\n<li>Blank Lines before Horizontal Rules across All Columns &#8230; loses (hr) raggedness with equal numbers of content lines (as necessary just <i>&amp;nbsp;<\/i>) added for each column before any Horizontal Rule placement each go<\/li>\n<li>Ragged Horizontal Rules can Happen<\/li>\n<li>Margin Top to Horizontal Rules &#8230; loses (hr) raggedness with a margin-top is given to the Horizontal Rules too high up the webpage to bring them back in line each go<\/li>\n<li>Light Green Padding Top to Horizontal Rules &#8230; loses (hr) raggedness with a padding-top is given to the Horizontal Rules too high up the webpage to bring them back in line each go<\/li>\n<li>Absolutely Positioning Invisible Horizontal Rules &#8230; loses (hr) raggedness with the Horizontal Rules initially not placed in the table but appended to a separate div in the webpage then the Horizontal Rules are position:absolute left:[like the left of its &#8220;data cell&#8221; top:[the biggest &#8220;data cell&#8221; bottom co-ordinate] width:[undefined and so is zero]<\/li>\n<li>Absolutely Positioning Visible Horizontal Rules &#8230; loses (hr) raggedness with the Horizontal Rules initially not placed in the table but appended to a separate div in the webpage then the Horizontal Rules are position:absolute left:[like the left of its &#8220;data cell&#8221; top:[the biggest &#8220;data cell&#8221; bottom co-ordinate] width:[&#8220;data cell&#8221; width] opacity:0.2 z-index:-1 marginTop:-25px<\/li>\n<\/ul>\n<p>Feel free to try any\/all these new ideas below &#8230;<\/p>\n<p><iframe style=\"width:100%;height:800px;\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplace_concepts.htm\"><\/iframe><\/p>\n<p>You can also see this play out at WordPress 4.1.1&#8217;s <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/workplace-concepts-game-horizontal-rule-cell-tutorial\/'>Workplace Concepts Game Primer Tutorial<\/a>.<\/p>\n<hr>\n<p id='wcgpt'>Previous relevant <a target=_blank title='Workplace Concepts Game Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/workplace-concepts-game-primer-tutorial\/'>Workplace Concepts Game Horizontal Rule Cell Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplace_concepts.html\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"Workplace Concepts Game Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplace_concepts.jpg\" title=\"Workplace Concepts Game Primer Tutorial\"   \/><\/a><p class=\"wp-caption-text\">Workplace Concepts Game Primer Tutorial<\/p><\/div>\n<p>Here&#8217;s a new web application project.  Content wise we take &#8230;<\/p>\n<ul>\n<li>a workplace concept &#8230;<\/li>\n<li>link that concept to one or more categories namely &#8220;rights&#8221;, &#8220;responsibilities&#8221;, &#8220;ethical&#8221;, &#8220;unethical&#8221; &#8230; <\/li>\n<li>organized into a single dimension array with semicolon and plus sign delimitation &#8230; in order to create &#8230;<\/li>\n<li>a web application game where the user presses buttons to categorize workplace concepts<\/li>\n<\/ul>\n<p>As you might imagine one person&#8217;s categorize can overlap and confuse for another person, but that is another matter.<\/p>\n<p>We organize the categories &#8220;rights&#8221;, &#8220;responsibilities&#8221;, &#8220;ethical&#8221;, &#8220;unethical&#8221; into HTML table heading (th) elements with associated (ie id is same as category name) non-header row cell (td) elements that get appended to by the user answers.<\/p>\n<p>New today was an idea we had to separate answer groups by td cells receiving a new hr (horizontal rule) element, but we want to improve that look (that gets ragged) over time.<\/p>\n<p>Why not try the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplace_concepts.html_GETME\" title=\"workplace_concepts.html\">workplace_concepts.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/workplace_concepts.html\" title=\"Click picture\">live run<\/a> link to see what we mean.<\/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='#d44967' onclick='var dv=document.getElementById(\"d44967\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/game\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d44967' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\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='#d44975' onclick='var dv=document.getElementById(\"d44975\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/position\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d44975' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\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='#d44992' onclick='var dv=document.getElementById(\"d44992\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/reveal\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d44992' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today we want to add a &#8220;reveal&#8221; feel to the previous Workplace Concepts Game Horizontal Rule Cell Tutorial. Our favourite &#8220;reveal&#8221; element combination is the team of details tag and its nested summary tag partner. The great thing about these &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/workplace-concepts-game-horizontal-rule-reveal-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,15,37],"tags":[2958,193,1580,2957,281,2310,476,477,2770,576,652,2673,842,2959,1988,997,1063,1075,2311,1238,1319,1369,2956,1493,2017],"class_list":["post-44992","post","type-post","status-publish","format-standard","hentry","category-elearning","category-games","category-tutorials","tag-categorize","tag-category","tag-cell","tag-concept","tag-css","tag-details","tag-game","tag-games-2","tag-horizontal-rule","tag-html","tag-javascript","tag-margin","tag-non-breaking-space","tag-padding","tag-position","tag-programming","tag-reveal","tag-row","tag-summary","tag-table","tag-tutorial","tag-video","tag-workplace","tag-youtube","tag-youtube-api"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/44992"}],"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=44992"}],"version-history":[{"count":3,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/44992\/revisions"}],"predecessor-version":[{"id":44996,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/44992\/revisions\/44996"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=44992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=44992"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=44992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}