{"id":208,"date":"2019-02-28T23:33:00","date_gmt":"2019-02-28T21:33:00","guid":{"rendered":"https:\/\/html-online.com\/articles\/?p=208"},"modified":"2022-01-27T15:53:53","modified_gmt":"2022-01-27T13:53:53","slug":"cookie-consent-warning-strap-website","status":"publish","type":"post","link":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/","title":{"rendered":"Cookie Consent warning strap with HTML-CSS-JS"},"content":{"rendered":"<p>We know there are many pointless, dumb laws out there that make no sense. The <a href=\"https:\/\/wikis.ec.europa.eu\/display\/WEBGUIDE\/04.+Cookies+and+similar+technologies\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">European Cookie Law<\/a> is also annoying because you have to start by closing a <a href=\"\/articles\/simple-popup-box\/\">popup<\/a> every single time you visit a website. This law is a privacy legislation that requires sites to get consent from visitors to store or retrieve any information about them.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/03\/cookie-law-warning-strap.png\" alt=\"cookie law warning strap\"><br \/>\n<!--more--><\/p>\n<h3>We have <a href=\"\/articles\/cookie-warning-widget-with-javascript\/\">updated this widget \u00bb<\/a><\/h3>\n<p>(Show it only for European visitors, until approval confirmation)<\/p>\n<p><em>There are two types of people:<\/em><br \/>\n<strong>1. The ones who know what is a cookie:<\/strong> They are aware that these little data files are necessary and almost every website is using them to improve the user experience, to collect analytics etc.<br \/>\n<strong>2. The ones who have no idea what a cookie is:<\/strong> They just get scared and confused when they see a warning popping up and they don&#8217;t know what that means anyway.<\/p>\n<p>I&#8217;m sure that Cookie warnings are not saying anything new to none of these groups.<\/p>\n<p>The fact is that we have to keep adding cookie consent notifications to our sites until they don&#8217;t change this madness. Website owners will need to make sure it complies with the law.<\/p>\n<p><strong>In this article I&#8217;m presenting a simple and elegant way of presenting a Cookie Consent notification in a strap at the bottom of the page. To implement it on your website you need to add the HTML-CSS-JS below<\/strong>:<\/p>\n<p>Add the HTML code to the bottom of your page. The strap will have a fixed position so basically you can put it wherever you want in the source code. Adjust the text and set up the links to point to your privacy policy document.<\/p>\n<pre style=\"background: #fff; color: #000;\"><span style=\"color: #1c02ff;\">&lt;<span style=\"font-weight: bold;\">div<\/span> <span style=\"font-style: italic;\">id<\/span>=<span style=\"color: #d80800;\">\"cookieConsent\"<\/span>&gt;<\/span>\n    <span style=\"color: #1c02ff;\">&lt;<span style=\"font-weight: bold;\">div<\/span> <span style=\"font-style: italic;\">id<\/span>=<span style=\"color: #d80800;\">\"closeCookieConsent\"<\/span>&gt;<\/span>x<span style=\"color: #1c02ff;\">&lt;\/<span style=\"font-weight: bold;\">div<\/span>&gt;<\/span>\n    This website is using cookies. <span style=\"color: #1c02ff;\">&lt;<span style=\"font-weight: bold;\">a<\/span> <span style=\"font-style: italic;\">href<\/span>=<span style=\"color: #d80800;\">\"#\"<\/span> <span style=\"font-style: italic;\">target<\/span>=<span style=\"color: #d80800;\">\"_blank\"<\/span>&gt;<\/span>More info<span style=\"color: #1c02ff;\">&lt;\/<span style=\"font-weight: bold;\">a<\/span>&gt;<\/span>. <span style=\"color: #1c02ff;\">&lt;<span style=\"font-weight: bold;\">a<\/span> <span style=\"font-style: italic;\">class<\/span>=<span style=\"color: #d80800;\">\"cookieConsentOK\"<\/span>&gt;<\/span>That's Fine<span style=\"color: #1c02ff;\">&lt;\/<span style=\"font-weight: bold;\">a<\/span>&gt;<\/span>\n<span style=\"color: #1c02ff;\">&lt;\/<span style=\"font-weight: bold;\">div<\/span>&gt;<\/span>\n<\/pre>\n<p>The CSS will style the notification to look like the image above.<\/p>\n<pre style=\"background: #fff; color: #000;\"><span style=\"color: #00b418;\">\/*Cookie Consent Begin*\/<\/span>\n<span style=\"font-style: italic;\">#cookieConsent<\/span> {\n    <span style=\"color: #6d79de; font-weight: bold;\">background-color<\/span>: <span style=\"color: #3c4c72; font-weight: bold;\">rgba<\/span>(<span style=\"color: #c5060b; font-style: italic;\">20,20,20,0.8<\/span>);\n    <span style=\"color: #6d79de; font-weight: bold;\">min-height<\/span>: <span style=\"color: #cd0000; font-style: italic;\">26<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">font-size<\/span>: <span style=\"color: #cd0000; font-style: italic;\">14<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">color<\/span>: <span style=\"color: #c5060b; font-style: italic;\">#ccc<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">line-height<\/span>: <span style=\"color: #cd0000; font-style: italic;\">26<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">padding<\/span>: <span style=\"color: #cd0000; font-style: italic;\">8<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #cd0000; font-style: italic;\">0<\/span> <span style=\"color: #cd0000; font-style: italic;\">8<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #cd0000; font-style: italic;\">30<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">font-family<\/span>: <span style=\"color: #d80800;\">\"Trebuchet MS\"<\/span>,<span style=\"color: #06960e; font-weight: bold;\">Helvetica<\/span>,<span style=\"color: #06960e; font-weight: bold;\">sans-serif<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">position<\/span>: <span style=\"color: #06960e; font-weight: bold;\">fixed<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">bottom<\/span>: <span style=\"color: #cd0000; font-style: italic;\">0<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">left<\/span>: <span style=\"color: #cd0000; font-style: italic;\">0<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">right<\/span>: <span style=\"color: #cd0000; font-style: italic;\">0<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">display<\/span>: <span style=\"color: #06960e; font-weight: bold;\">none<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">z-index<\/span>: <span style=\"color: #cd0000; font-style: italic;\">9999<\/span>;\n}\n<span style=\"font-style: italic;\">#cookieConsent<\/span> <span style=\"font-weight: bold;\">a<\/span> {\n    <span style=\"color: #6d79de; font-weight: bold;\">color<\/span>: <span style=\"color: #c5060b; font-style: italic;\">#4B8EE7<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">text-decoration<\/span>: <span style=\"color: #06960e; font-weight: bold;\">none<\/span>;\n}\n<span style=\"font-style: italic;\">#closeCookieConsent<\/span> {\n    <span style=\"color: #6d79de; font-weight: bold;\">float<\/span>: <span style=\"color: #06960e; font-weight: bold;\">right<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">display<\/span>: <span style=\"color: #06960e; font-weight: bold;\">inline-block<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">cursor<\/span>: <span style=\"color: #06960e; font-weight: bold;\">pointer<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">height<\/span>: <span style=\"color: #cd0000; font-style: italic;\">20<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">width<\/span>: <span style=\"color: #cd0000; font-style: italic;\">20<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">margin<\/span>: <span style=\"color: #cd0000; font-style: italic;\">-15<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #cd0000; font-style: italic;\">0<\/span> <span style=\"color: #cd0000; font-style: italic;\">0<\/span> <span style=\"color: #cd0000; font-style: italic;\">0<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">font-weight<\/span>: <span style=\"color: #06960e; font-weight: bold;\">bold<\/span>;\n}\n<span style=\"font-style: italic;\">#closeCookieConsent<\/span><span style=\"font-style: italic;\">:hover<\/span> {\n    <span style=\"color: #6d79de; font-weight: bold;\">color<\/span>: <span style=\"color: #c5060b; font-style: italic;\">#FFF<\/span>;\n}\n<span style=\"font-style: italic;\">#cookieConsent<\/span> <span style=\"font-weight: bold;\">a<\/span><span style=\"font-style: italic;\">.cookieConsentOK<\/span> {\n    <span style=\"color: #6d79de; font-weight: bold;\">background-color<\/span>: <span style=\"color: #c5060b; font-style: italic;\">#F1D600<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">color<\/span>: <span style=\"color: #c5060b; font-style: italic;\">#000<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">display<\/span>: <span style=\"color: #06960e; font-weight: bold;\">inline-block<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">border-radius<\/span>: <span style=\"color: #cd0000; font-style: italic;\">5<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">padding<\/span>: <span style=\"color: #cd0000; font-style: italic;\">0<\/span> <span style=\"color: #cd0000; font-style: italic;\">20<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">cursor<\/span>: <span style=\"color: #06960e; font-weight: bold;\">pointer<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">float<\/span>: <span style=\"color: #06960e; font-weight: bold;\">right<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">margin<\/span>: <span style=\"color: #cd0000; font-style: italic;\">0<\/span> <span style=\"color: #cd0000; font-style: italic;\">60<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #cd0000; font-style: italic;\">0<\/span> <span style=\"color: #cd0000; font-style: italic;\">10<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n}\n<span style=\"font-style: italic;\">#cookieConsent<\/span> <span style=\"font-weight: bold;\">a<\/span><span style=\"font-style: italic;\">.cookieConsentOK<\/span><span style=\"font-style: italic;\">:hover<\/span> {\n    <span style=\"color: #6d79de; font-weight: bold;\">background-color<\/span>: <span style=\"color: #c5060b; font-style: italic;\">#E0C91F<\/span>;\n}\n<span style=\"color: #00b418;\">\/*Cookie Consent End*\/<\/span>\n<\/pre>\n<p>The script that handles the toggle of the pop-up is using jQuery and it&#8217;s set to delay the warning with 4 seconds after the page load.<\/p>\n<pre style=\"background: #fff; color: #000;\"><span style=\"color: #687687;\">$<\/span>(<span style=\"color: #6d79de; font-weight: bold;\">document<\/span>).ready(function(){   \n    <span style=\"color: #3c4c72; font-weight: bold;\">setTimeout<\/span>(function () {\n        <span style=\"color: #687687;\">$<\/span>(<span style=\"color: #d80800;\">\"#cookieConsent\"<\/span>).fadeIn(<span style=\"color: #cd0000; font-style: italic;\">200<\/span>);\n     }, <span style=\"color: #cd0000; font-style: italic;\">4000<\/span>);\n    <span style=\"color: #687687;\">$<\/span>(<span style=\"color: #d80800;\">\"#closeCookieConsent, .cookieConsentOK\"<\/span>).<span style=\"color: #3c4c72; font-weight: bold;\">click<\/span>(function() {\n        <span style=\"color: #687687;\">$<\/span>(<span style=\"color: #d80800;\">\"#cookieConsent\"<\/span>).fadeOut(<span style=\"color: #cd0000; font-style: italic;\">200<\/span>);\n    }); \n}); \n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>We know there are many pointless, dumb laws out there that make no sense. The European Cookie Law is also annoying because you have to start by closing a popup every single time you visit a website. This law is a privacy legislation that requires sites to get consent from visitors to store or retrieve &hellip; <a href=\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Cookie Consent warning strap with HTML-CSS-JS&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,2,3,4,5,6,8],"tags":[],"class_list":["post-208","post","type-post","status-publish","format-standard","hentry","category-articles","category-css","category-freebies","category-html","category-javascript","category-jquery","category-tools"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Cookie Consent warning strap with HTML-CSS-JS - HTML Online<\/title>\n<meta name=\"description\" content=\"In this article I&#039;m presenting a simple and elegant way of presenting a Cookie Consent notification in a strap at the bottom of the page. HTML-CSS-JS below\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cookie Consent warning strap with HTML-CSS-JS - HTML Online\" \/>\n<meta property=\"og:description\" content=\"In this article I&#039;m presenting a simple and elegant way of presenting a Cookie Consent notification in a strap at the bottom of the page. HTML-CSS-JS below\" \/>\n<meta property=\"og:url\" content=\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/\" \/>\n<meta property=\"og:site_name\" content=\"HTML Online\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/htmlcoding\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-02-28T21:33:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-27T13:53:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/03\/cookie-law-warning-strap.png\" \/>\n<meta name=\"author\" content=\"HTML Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"HTML Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/\"},\"author\":{\"name\":\"HTML Editor\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d\"},\"headline\":\"Cookie Consent warning strap with HTML-CSS-JS\",\"datePublished\":\"2019-02-28T21:33:00+00:00\",\"dateModified\":\"2022-01-27T13:53:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/\"},\"wordCount\":323,\"publisher\":{\"@id\":\"https:\/\/html-online.com\/articles\/#organization\"},\"image\":{\"@id\":\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/03\/cookie-law-warning-strap.png\",\"articleSection\":[\"Articles\",\"CSS\",\"Freebies\",\"HTML\",\"JavaScript\",\"jQuery\",\"Tools\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/\",\"url\":\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/\",\"name\":\"Cookie Consent warning strap with HTML-CSS-JS - HTML Online\",\"isPartOf\":{\"@id\":\"https:\/\/html-online.com\/articles\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/03\/cookie-law-warning-strap.png\",\"datePublished\":\"2019-02-28T21:33:00+00:00\",\"dateModified\":\"2022-01-27T13:53:53+00:00\",\"description\":\"In this article I'm presenting a simple and elegant way of presenting a Cookie Consent notification in a strap at the bottom of the page. HTML-CSS-JS below\",\"breadcrumb\":{\"@id\":\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#primaryimage\",\"url\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/03\/cookie-law-warning-strap.png\",\"contentUrl\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/03\/cookie-law-warning-strap.png\",\"width\":522,\"height\":42,\"caption\":\"cookie law warning strap\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/html-online.com\/articles\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cookie Consent warning strap with HTML-CSS-JS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/html-online.com\/articles\/#website\",\"url\":\"https:\/\/html-online.com\/articles\/\",\"name\":\"HTML Online Articles\",\"description\":\"Tips, tricks, tutorials\u2026\",\"publisher\":{\"@id\":\"https:\/\/html-online.com\/articles\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/html-online.com\/articles\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/html-online.com\/articles\/#organization\",\"name\":\"HTML Online\",\"url\":\"https:\/\/html-online.com\/articles\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg\",\"contentUrl\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg\",\"width\":350,\"height\":350,\"caption\":\"HTML Online\"},\"image\":{\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/htmlcoding\/\",\"https:\/\/www.linkedin.com\/in\/ferencdenes\/\",\"https:\/\/www.youtube.com\/channel\/UCn38Jw1sJzbjVHO95Zp0Sww\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d\",\"name\":\"HTML Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g\",\"caption\":\"HTML Editor\"},\"description\":\"In 2013, while wrestling with a mountain of client articles and an uncooperative CMS, I decided enough was enough. So, I created an online HTML editor purely out of necessity (and mild frustration). What began as a tool for my own sanity quickly evolved into a gift for the world\u2014or at least for anyone trying to avoid breaking their website's code. Since then, I've shared my tech notes on my blog, which serves as both a handy reference and a digital diary of the adventures and misadventures of a coder.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/ferencdenes\/\",\"https:\/\/www.youtube.com\/@htmlg\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Cookie Consent warning strap with HTML-CSS-JS - HTML Online","description":"In this article I'm presenting a simple and elegant way of presenting a Cookie Consent notification in a strap at the bottom of the page. HTML-CSS-JS below","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/","og_locale":"en_GB","og_type":"article","og_title":"Cookie Consent warning strap with HTML-CSS-JS - HTML Online","og_description":"In this article I'm presenting a simple and elegant way of presenting a Cookie Consent notification in a strap at the bottom of the page. HTML-CSS-JS below","og_url":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/","og_site_name":"HTML Online","article_publisher":"https:\/\/www.facebook.com\/htmlcoding\/","article_published_time":"2019-02-28T21:33:00+00:00","article_modified_time":"2022-01-27T13:53:53+00:00","og_image":[{"url":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/03\/cookie-law-warning-strap.png","type":"","width":"","height":""}],"author":"HTML Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"HTML Editor","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#article","isPartOf":{"@id":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/"},"author":{"name":"HTML Editor","@id":"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d"},"headline":"Cookie Consent warning strap with HTML-CSS-JS","datePublished":"2019-02-28T21:33:00+00:00","dateModified":"2022-01-27T13:53:53+00:00","mainEntityOfPage":{"@id":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/"},"wordCount":323,"publisher":{"@id":"https:\/\/html-online.com\/articles\/#organization"},"image":{"@id":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#primaryimage"},"thumbnailUrl":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/03\/cookie-law-warning-strap.png","articleSection":["Articles","CSS","Freebies","HTML","JavaScript","jQuery","Tools"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/","url":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/","name":"Cookie Consent warning strap with HTML-CSS-JS - HTML Online","isPartOf":{"@id":"https:\/\/html-online.com\/articles\/#website"},"primaryImageOfPage":{"@id":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#primaryimage"},"image":{"@id":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#primaryimage"},"thumbnailUrl":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/03\/cookie-law-warning-strap.png","datePublished":"2019-02-28T21:33:00+00:00","dateModified":"2022-01-27T13:53:53+00:00","description":"In this article I'm presenting a simple and elegant way of presenting a Cookie Consent notification in a strap at the bottom of the page. HTML-CSS-JS below","breadcrumb":{"@id":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#primaryimage","url":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/03\/cookie-law-warning-strap.png","contentUrl":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/03\/cookie-law-warning-strap.png","width":522,"height":42,"caption":"cookie law warning strap"},{"@type":"BreadcrumbList","@id":"https:\/\/html-online.com\/articles\/cookie-consent-warning-strap-website\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/html-online.com\/articles\/"},{"@type":"ListItem","position":2,"name":"Cookie Consent warning strap with HTML-CSS-JS"}]},{"@type":"WebSite","@id":"https:\/\/html-online.com\/articles\/#website","url":"https:\/\/html-online.com\/articles\/","name":"HTML Online Articles","description":"Tips, tricks, tutorials\u2026","publisher":{"@id":"https:\/\/html-online.com\/articles\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/html-online.com\/articles\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/html-online.com\/articles\/#organization","name":"HTML Online","url":"https:\/\/html-online.com\/articles\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/","url":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg","contentUrl":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg","width":350,"height":350,"caption":"HTML Online"},"image":{"@id":"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/htmlcoding\/","https:\/\/www.linkedin.com\/in\/ferencdenes\/","https:\/\/www.youtube.com\/channel\/UCn38Jw1sJzbjVHO95Zp0Sww"]},{"@type":"Person","@id":"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d","name":"HTML Editor","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/html-online.com\/articles\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g","caption":"HTML Editor"},"description":"In 2013, while wrestling with a mountain of client articles and an uncooperative CMS, I decided enough was enough. So, I created an online HTML editor purely out of necessity (and mild frustration). What began as a tool for my own sanity quickly evolved into a gift for the world\u2014or at least for anyone trying to avoid breaking their website's code. Since then, I've shared my tech notes on my blog, which serves as both a handy reference and a digital diary of the adventures and misadventures of a coder.","sameAs":["https:\/\/www.linkedin.com\/in\/ferencdenes\/","https:\/\/www.youtube.com\/@htmlg"]}]}},"_links":{"self":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts\/208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/comments?post=208"}],"version-history":[{"count":9,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts\/208\/revisions"}],"predecessor-version":[{"id":1751,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts\/208\/revisions\/1751"}],"wp:attachment":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/media?parent=208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/categories?post=208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/tags?post=208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}