{"id":45537,"date":"2019-07-06T03:01:05","date_gmt":"2019-07-05T17:01:05","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=45537"},"modified":"2019-07-06T07:31:02","modified_gmt":"2019-07-05T21:31:02","slug":"css-selectors-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/css-selectors-primer-tutorial\/","title":{"rendered":"CSS Selectors Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/server_client.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"CSS Selectors Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/server_client_selectors.jpg\" title=\"CSS Selectors Primer Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">CSS Selectors Primer Tutorial<\/p><\/div>\n<p>We recently instigated some cosmetic changes that we liked the look of at this blog and in a web application <font color=red><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/server_client.html--GETME\" title=\"server_client.html\">the changed<\/a><\/font> <font color=blue>CSS selectors<\/font> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/server_client.html--GETME\" title=\"server_client.html\">server_client.html<\/a> &#8230;<\/p>\n<p><code><br \/>\n<font color=red>&lt;style&gt;<br \/>\n* { opacity: 0.9; }<\/font><br \/>\n<font color=blue>*:hover { opacity: 1.0; }<br \/>\ntd:active { border: 1px dashed purple; }<br \/>\na:linked { color: blue; }<br \/>\na:visited { color: pink; }<br \/>\ninput:focus { background-color: yellow; }<\/font><br \/>\n<font color=red>th { text-align: left; }<br \/>\nh1, h3 { opacity: 1.0; }<br \/>\n&lt;\/style&gt;<\/font><br \/>\n<\/code><\/p>\n<p> &#8230; of recent times.  We took as inspiration how  <a target=_blank title='Capturing Audio &#038; Video in HTML5' href='https:\/\/www.html5rocks.com\/en\/tutorials\/getusermedia\/intro\/'>HTML5 Rocks<\/a> styles their &#8220;code&#8221; snippets, but we didn&#8217;t want this style effect immediately, rather for when the user hovers over it &#8230; hence the CSS selector &#8230;<\/p>\n<p><code><br \/>\n&lt;style&gt;<br \/>\n<font color=blue>*:hover { opacity: 1.0; }<\/font><br \/>\n&lt;\/style&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; <a target=_blank title=\"but there's more\" href=\"http:\/\/www.youtube.com\/watch?v=iiATDMHU7gc\">&#8220;but there&#8217;s more&#8221;<\/a> <font size=1>(and a bit less, like here on Google Chrome (web browser) this <a target=_blank title='CSS selector :hover' href='https:\/\/www.w3schools.com\/cssref\/sel_hover.asp'>:hover<\/a> CSS selector seems to be sporadic)<\/font> &#8230;<\/p>\n<ul>\n<li><a target=_blank title='CSS selector :visited' href='https:\/\/www.w3schools.com\/cssref\/sel_visited.asp'>:visited<\/a> CSS selector can style links you have clicked (ie. visited)<\/li>\n<li><a target=_blank title='CSS selector :focus' href='https:\/\/www.w3schools.com\/cssref\/sel_focus.asp'>:focus<\/a> CSS selector can style <i>input<\/i> elements in focus (ie. awaiting interactive input, perhaps, from the user)<\/li>\n<li><a target=_blank title='CSS selector :active' href='https:\/\/www.w3schools.com\/cssref\/sel_active.asp'>:active<\/a> CSS selector can style active link<\/li>\n<\/ul>\n<p>We&#8217;ll include an HTML iframe (of that aforesaid mentioned <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/server_client.html\" title=\"server_client.html\">web application<\/a>) below for you to try all this out below<\/p>\n<p><iframe src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/server_client.html\" style=\"width:100%;height:800px;\"><\/iframe><\/p>\n<p> &#8230; versus the &#8220;old way&#8221; &#8230;<\/p>\n<p><iframe src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/server_client.html?nostyle=y\" style=\"width:100%;height:800px;\"><\/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='#d43152' onclick='var dv=document.getElementById(\"d43152\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/search-engine\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d43152' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We recently instigated some cosmetic changes that we liked the look of at this blog and in a web application the changed CSS selectors server_client.html &#8230; &lt;style&gt; * { opacity: 0.9; } *:hover { opacity: 1.0; } td:active { border: &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/css-selectors-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":[218,281,1608,997,1953,1209,1212,1319],"class_list":["post-45537","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-code","tag-css","tag-hover","tag-programming","tag-selector","tag-style","tag-styling","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/45537"}],"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=45537"}],"version-history":[{"count":7,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/45537\/revisions"}],"predecessor-version":[{"id":45544,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/45537\/revisions\/45544"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=45537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=45537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=45537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}