{"id":54279,"date":"2021-12-16T03:01:02","date_gmt":"2021-12-15T17:01:02","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=54279"},"modified":"2021-12-16T08:15:17","modified_gmt":"2021-12-15T22:15:17","slug":"sprite-background-menu-navigation-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/sprite-background-menu-navigation-primer-tutorial\/","title":{"rendered":"Sprite Background Menu Navigation Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/sprite_eg.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Sprite Background Menu Navigation Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/sprite_eg.gif\" title=\"Sprite Background Menu Navigation Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Sprite Background Menu Navigation Primer Tutorial<\/p><\/div>\n<p>There are a lot of ways to design and code for a menu used for navigation in a webpage.  We happened to be reading <a target=_blank title='https:\/\/www.tutorialrepublic.com\/css-tutorial\/css-sprites.php' href='\/\/www.tutorialrepublic.com\/css-tutorial\/css-sprites.php'>CSS Sprites<\/a>, and where it said &#8230;<\/p>\n<blockquote cite='\/\/www.tutorialrepublic.com\/css-tutorial\/css-sprites.php'><p>\nCSS sprites technique is a way to reduce the number of HTTP requests made for image resources, by combining images in a single file.\n<\/p><\/blockquote>\n<p> &#8230; and its great menu navigation example (which forms a huge part of our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/sprite_eg.html_GETME\">sprite_eg.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/sprite_eg.html\">live run<\/a> link), we wanted to use it to adapt it with inhouse content.  That content is the Sprite image we constructed with a combination of &#8230;<\/p>\n<ul>\n<li><a target=_blank title='Google image search' href='https:\/\/www.google.com\/search?q=rjmprogramming&#038;tbm=isch&#038;hl=en&#038;chips=q:rjmprogramming,online_chips:javascript&#038;sa=X&#038;ved=2ahUKEwiT19P2iuP0AhV4jNgFHWsyA7wQ4lYoB3oECAEQIA&#038;biw=1440&#038;bih=738'>some inhouse images<\/a> via a Google image search, thanks<\/li>\n<li>in macOS command-control-shift-3 to <a target=_blank title='macOS PaintBrush' href='https:\/\/paintbrush.sourceforge.io\/'>Paintbrush<\/a> File-&gt;New from Clipboard to huhagain.png (internal use only)<\/li>\n<li>in macOS Paintbrush File-&gt;New 50 pixels x 500 pixels saved to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/newSprite.png\">newSprite.png <!--img src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/newSprite.png\"><\/img--><\/a> &#8230; though at this early stage imagine it all white &#8230;<\/li>\n<table>\n<tr>\n<th colspan=5>For 5 image choices<\/th>\n<\/tr>\n<tr>\n<th>oneinfive.png<\/th>\n<th>twoinfive.png<\/th>\n<th>threeinfive.png<\/th>\n<th>fourinfive.png<\/th>\n<th>fiveinfive.png<\/th>\n<\/tr>\n<tr>\n<td>\nRectangular select from huhagain.png relevant bit<br \/>\nFile-&gt;New from Clipboard<br \/>Image-&gt;Image Size&#8230; 50 pixels x 50pixels<br \/>\nFile-&gt;Save As&#8230; oneinfive.jpg<br \/>\nEdit-&gt;Select All<br \/>\nEdit-&gt;Copy<\/p>\n<p>#Reopen Paintbrush huhagain.png<br \/>\nEdit-&gt;Paste<br \/>\nDrag to whitespace slot that is free &#8230;<\/p>\n<p>In terminal (with <a target=_blank title='ImageMagick' href='http:\/\/www.imagemagick.org'>ImageMagick<\/a> installed) &#8230;<br \/>\n$ convert oneinfive.png -channel RGB -negate onefive.jpg<\/p>\n<p>Open Paintbrush onefive.jpg<br \/>\nEdit-&gt;Select All<br \/>\nEdit-&gt;Copy<\/p>\n<p>#Reopen Paintbrush huhagain.png<br \/>\nEdit-&gt;Paste<br \/>\nDrag to whitespace slot that is free\n<\/td>\n<td>As far left <br \/>substitute &#8220;one&#8221; for &#8220;two&#8221;<\/td>\n<td>As far left <br \/>substitute &#8220;one&#8221; for &#8220;three&#8221;<\/td>\n<td>As far left <br \/>substitute &#8220;one&#8221; for &#8220;four&#8221;<\/td>\n<td>As far left <br \/>substitute &#8220;one&#8221; for &#8220;five&#8221;<\/td>\n<\/tr>\n<\/table>\n<\/li>\n<tr>\n<th colspan=5>#Reopen Paintbrush huhagain.png and File-&gt;SaveAs&#8230; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/newSprite.png\">newSprite.png  <img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/newSprite.png\"><\/img><\/a><\/th>\n<\/tr>\n<\/ul>\n<p> &#8230; to end up with the originals and negated &#8220;onhover flip sided&#8221; colour negations (or inversion) Sprite image backgrounds to the menu imagery.  We hope it interests!<\/p>\n<p><iframe src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/sprite_eg.html\" style=\"width:100%;height:600px;\"><\/iframe><\/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='#d54279' onclick='var dv=document.getElementById(\"d54279\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/paintbrush\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d54279' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>There are a lot of ways to design and code for a menu used for navigation in a webpage. We happened to be reading CSS Sprites, and where it said &#8230; CSS sprites technique is a way to reduce the &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/sprite-background-menu-navigation-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":[126,2471,265,281,2237,576,590,1658,770,3876,830,896,907,997,2173,1209,1212,1319,1418],"class_list":["post-54279","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-background","tag-background-position","tag-copy","tag-css","tag-drag","tag-html","tag-image","tag-imagemagick","tag-menu","tag-missing-javascript","tag-navigation","tag-paintbrush","tag-paste","tag-programming","tag-sprite","tag-style","tag-styling","tag-tutorial","tag-webpage"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54279"}],"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=54279"}],"version-history":[{"count":10,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54279\/revisions"}],"predecessor-version":[{"id":54290,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54279\/revisions\/54290"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=54279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=54279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=54279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}