{"id":93,"date":"2019-03-15T09:09:05","date_gmt":"2019-03-15T09:09:05","guid":{"rendered":"https:\/\/www.samarthya.me\/wps\/?p=93"},"modified":"2019-03-15T09:09:05","modified_gmt":"2019-03-15T09:09:05","slug":"css-continued","status":"publish","type":"post","link":"https:\/\/blog.samarthya.me\/wps\/2019\/03\/15\/css-continued\/","title":{"rendered":"CSS continued"},"content":{"rendered":"<h1>Pseudo classes<\/h1>\n<p>State dependent styling, e.g Style a checkbox when it is in checked state. It is usually denoted by a preceding colon &#8216;:&#8217; (without the quote).<\/p>\n<blockquote><p>:active<br \/>\n:checked<br \/>\n:default<br \/>\n:dir<br \/>\n:disabled<br \/>\n:empty<\/p><\/blockquote>\n<p>E.g.<\/p>\n<blockquote><p>&lt;div id=&#8221;myDiv&#8221;&gt; &lt;a href=#&gt; Dummy link&lt;\/a&gt; &lt;\/div&gt;<\/p><\/blockquote>\n<p>Styling<\/p>\n<blockquote><p>&lt;style&gt;<br \/>\ndiv {<br \/>\nbackground: cyan;<br \/>\nmargin: 15px 0px 15px 25px;<br \/>\nborder: 0px;<br \/>\n}<\/p>\n<p>div:focus {<br \/>\nborder: 1px;<br \/>\n}<br \/>\na {<br \/>\ntext-decoration: none;<br \/>\ncolor: red;<br \/>\n}<\/p>\n<p>a:visited {<br \/>\ncolor: rosybrown;<br \/>\n}<\/p>\n<p>a:hover {<br \/>\ncolor: green;<br \/>\ntext-decoration: overline;<br \/>\n}<br \/>\n&lt;\/style&gt;<\/p><\/blockquote>\n<h2>Pseudo elements<\/h2>\n<p>Keywords denoted by two colons (::) specified at the end of selector.<\/p>\n<p>I am trying to add the URL information after the Anchor content.<\/p>\n<blockquote><p>div id=&#8221;myDiv&#8221;&gt; &lt;a href=&#8221;http:\/\/www.yahoo.com&#8221;&gt; Dummy link&lt;\/a&gt; &lt;\/div&gt;<\/p><\/blockquote>\n<p>Using the style and the pseudo element ::after<\/p>\n<blockquote><p>a::after {<br \/>\ncontent: &#8221; (&#8221; attr(href) &#8220;)&#8221;;<br \/>\n}<\/p><\/blockquote>\n<p>Brings the desired result<\/p>\n<p><img decoding=\"async\" class=\"size-medium wp-image-101\" src=\"https:\/\/www.samarthya.me\/wps\/wp-content\/uploads\/2019\/03\/Screenshot-2019-03-15-at-2.31.28-PM-300x47.png\" alt=\"Dummy link\" width=\"300\" height=\"47\" srcset=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2019\/03\/Screenshot-2019-03-15-at-2.31.28-PM-300x47.png 300w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2019\/03\/Screenshot-2019-03-15-at-2.31.28-PM-200x31.png 200w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2019\/03\/Screenshot-2019-03-15-at-2.31.28-PM.png 614w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pseudo classes State dependent styling, e.g Style a checkbox when it is in checked state. It is usually denoted by a preceding colon &#8216;:&#8217; (without the quote). :active :checked :default :dir :disabled :empty E.g. &lt;div id=&#8221;myDiv&#8221;&gt; &lt;a href=#&gt; Dummy link&lt;\/a&gt; &lt;\/div&gt; Styling &lt;style&gt; div { background: cyan; margin: 15px 0px 15px 25px; border: 0px; } [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-93","post","type-post","status-publish","format-standard","hentry","category-personal"],"_links":{"self":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts\/93","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/comments?post=93"}],"version-history":[{"count":0,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts\/93\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/media?parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/categories?post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/tags?post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}