{"id":8702,"date":"2014-07-30T05:03:52","date_gmt":"2014-07-29T19:03:52","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=8702"},"modified":"2014-07-30T05:03:52","modified_gmt":"2014-07-29T19:03:52","slug":"htmlcss-overlay-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/htmlcss-overlay-primer-tutorial\/","title":{"rendered":"HTML\/CSS Overlay Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/zindex_positionabsolute_overlay.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"HTML\/CSS Overlay Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/zindex_positionabsolute_overlay.jpg\" title=\"HTML\/CSS Overlay Primer Tutorial\" \/><\/a><p class=\"wp-caption-text\">HTML\/CSS Overlay Primer Tutorial<\/p><\/div>\n<p>A previous <a target=_blank href=\"#glpt\">Gimp Layers Primer Tutorial<\/a> (as shown below) gave you an insight into the massive possibilities of using a sophisticated image editor and use layers with various amounts of transparency, especially suited to use with png image files, and today we build on that idea to present another idea along those same wavelengths (&#8220;permanent wave&#8221; for those having a bad hair day or have a hand that wants to <a target=_blank href='https:\/\/www.flickr.com\/photos\/alextsolomon\/2708602175\/' title='the hand that waves'>wave<\/a> &#8230; don&#8217;t we all?!) in the use of HTML and CSS and use the concepts of:<\/p>\n<ul>\n<li><a target=_blank href='http:\/\/www.w3schools.com\/cssref\/pr_pos_z-index.asp' title='z-index information from w3schools'><i>z-index<\/i><\/a><\/li>\n<li><a target=_blank href='http:\/\/www.w3schools.com\/cssref\/pr_class_position.asp' title='position:absolute information from w3schools'><i>position:absolute<\/i><\/a><\/li>\n<li><a target=_blank href='http:\/\/www.w3schools.com\/css\/css_image_transparency.asp' title='opacity information from w3schools'><i>opacity<\/i><\/a><\/li>\n<li>same size for elements (optional idea, but good for ease of use)<\/li>\n<\/ul>\n<p>In that previous <a target=_blank href=\"#glpt\">Gimp Layers Primer Tutorial<\/a> (as shown below) transparency (or its obverse, opacity) can be used to have the one image achieve several &#8220;ends&#8221; (ie. purposes).  The same thing happens today by overlaying an image on top of a Google Line Chart plotting a parabola (presented in an iframe, whose dimensions are arranged to match the dimensions and positioning of our image &#8230; hence the <i>&#8220;optional idea&#8221;<\/i> above), to have the image content help out the Google chart, to clarify axis names and hence, help refine the purpose of the chart.<\/p>\n<p>In that previous <a target=_blank href=\"#glpt\">Gimp Layers Primer Tutorial<\/a> (as shown below) we mentioned that lots of those classic &#8220;Photoshopping&#8221; techniques can be achieved in Gimp, and some other <a target=_blank title='Gimp tutorials here' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=4'>tutorials<\/a> at this blog touch on that.  What we can say today is that CSS can help out as well, to achieve similar ends, or you can adopt a combination of approaches, perhaps.<\/p>\n<p>In that previous <a target=_blank href=\"#glpt\">Gimp Layers Primer Tutorial<\/a> (as shown below) we imagined what the concept of a layer was with regard to image manipulation.   Today we see it in terms of layering HTML elements using the CSS z-index idea &#8230; the bigger the z-index the closer the &#8220;layer&#8221; is to the viewer&#8217;s eye (read about the Earth <a target=_blank title='Earth geoid information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Geoid'>geoid<\/a> here and as a space traveller you&#8217;d be tempted to give Mt Everest a z-index of about <i>z-index:8000<\/i> and the Dead Sea a z-index of <i>z-index:-418<\/i> &#8230; except that Mt Everest doesn&#8217;t sit on top of the Dead Sea, the last time I did the R&#038;D &#8230; <a target=_blank title=\"Nepal and Israel's Mt Everest and Dead Sea stamp\" href='https:\/\/www.google.com.au\/search?q=Mt+Everest+on+top+of+the+Dead+Sea+stamp&#038;client=firefox-a&#038;hs=BJb&#038;rls=org.mozilla:en-US:official&#038;channel=sb&#038;tbm=isch&#038;imgil=MxRg2pFhmpdZOM%253A%253Bhttps%253A%252F%252Fencrypted-tbn0.gstatic.com%252Fimages%253Fq%253Dtbn%253AANd9GcT7YagMzhRzEt7mrELHeg7_LYMAEf_lXiy71C01EMHwKHCP_LBQfA%253B286%253B379%253ByEc78MPZuV2IMM%253Bhttp%25253A%25252F%25252Fwww.mountainstamp.com%25252FIsrael%2525252520pages%25252FDead%2525252520Sea.html&#038;source=iu&#038;usg=__r_0izsD1amxdL12Pix2GC5wKRiw%3D&#038;sa=X&#038;ei=uRDYU-HfBcOj8AXuwIHYBw&#038;ved=0CCgQ9QEwAw&#038;biw=1280&#038;bih=673#facrc=_&#038;imgdii=_&#038;imgrc=MxRg2pFhmpdZOM%253A%3ByEc78MPZuV2IMM%3Bhttp%253A%252F%252Fwww.mountainstamp.com%252FNepal%252520picture%252FNepal%2525202012%252520Mount%252520Everest%252520Dead%252520Sea%252520stamp%252520joint%252520issue%252520Nepal%252520and%252520Israel.jpg%3Bhttp%253A%252F%252Fwww.mountainstamp.com%252FIsrael%252520pages%252FDead%252520Sea.html%3B286%3B379'>mind you?!<\/a> &#8230; <i>z-index:<strike>8000<\/strike>8848<\/i> vs <i>z-index:<strike>-418<\/strike>-422<\/i>), and then we allow opacities less than one (one is opaque, zero is transparent) to make room for multiple layer see through effects.   The use of <i>position:absolute<\/i> opens the door to the web browser sort of being fooled into doing something that doesn&#8217;t come naturally to it &#8230; overlay HTML elements (possibly) on top of each other &#8230; another CSS parameter you may be interested in for overlay is the use of negative values for <a target=_blank href='http:\/\/www.w3schools.com\/cssref\/pr_margin-top.asp' title='margin-top information from w3schools'><i>margin-top<\/i><\/a>.<\/p>\n<p>Link to some HTML and CSS programming source code is here and you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/zindex_positionabsolute_overlay.html_GETME\" title=\"zindex_positionabsolute_overlay.html\">zindex_positionabsolute_overlay.html<\/a> and try the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/zindex_positionabsolute_overlay.html\" title=\"Live Run\">live run<\/a> while you are at it.  In isolation the overlay is pretty simple and can be called  <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/xaxis.png\" title=\"xaxis.png\">xaxis.png<\/a><\/p>\n<hr \/>\n<p id=\"glpt\">Previous relevant <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5366\">Gimp Layers Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/GIMP\/Layers\/GimpLayers.m4v\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Gimp Layers Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/GIMP\/Layers\/GimpLayers.jpg\" title=\"Gimp Layers Primer Tutorial\" \/><\/a><p class=\"wp-caption-text\">Gimp Layers Primer Tutorial<\/p><\/div>\n<p>Here is a tutorial that gives you an insight into the massive possibilities of using a sophisticated image editor and use layers with various amounts of transparency, especially suited to use with png image files.<\/p>\n<p>Transparency (or its obverse, opacity) can be used to have the one image achieve several &#8220;ends&#8221; (ie. purposes).  Although it is a bit of a clumsy example in the tutorial, you can see that the technique can be used for artistic purposes &#8230; often called &#8220;Photoshopping&#8221; (named after the more famous, and also brilliant, rival product, Photoshop).<\/p>\n<p>Lots of those classic &#8220;Photoshopping&#8221; techniques can be achieved in Gimp, and some other <a target=_blank title='Gimp tutorials here' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=4'>tutorials<\/a> at this blog touch on that.<\/p>\n<p>Am sure you can imagine what the concept of a layer is with regard to image manipulation.   Within Gimp, for beginners not used to this concept, you find yourself underestimating and underplaying what can be achieved with the various layers of a multi-layered image.   In simplistic terms each layer has the functionality in Gimp to be treated as a whole new image, and this is the best way to think of it when trying to achieve what you want to achieve with Gimp.<\/p>\n<p>Link to Gimp &#8220;spiritual home&#8221; &#8230; <a target=_blank href='http:\/\/www.gimp.org' title='Gimp'>here<\/a>.<br \/>\nLink to Gimp forum &#8230; <a target=_blank href='http:\/\/gimpforums.com\/' title='Google Geo Charts'>here<\/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='#d5366' onclick='var dv=document.getElementById(\"d5366\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=4\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d5366' 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='#d8702' onclick='var dv=document.getElementById(\"d8702\"); 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='d8702' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A previous Gimp Layers Primer Tutorial (as shown below) gave you an insight into the massive possibilities of using a sophisticated image editor and use layers with various amounts of transparency, especially suited to use with png image files, and &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/htmlcss-overlay-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,16,37],"tags":[281,491,513,518,576,599,894,997,1319],"class_list":["post-8702","post","type-post","status-publish","format-standard","hentry","category-elearning","category-gimp","category-tutorials","tag-css","tag-gimp","tag-google","tag-google-chart","tag-html","tag-img","tag-overlay","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/8702"}],"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=8702"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/8702\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=8702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=8702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=8702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}