{"id":2337,"date":"2017-04-20T17:09:54","date_gmt":"2017-04-20T17:09:54","guid":{"rendered":"https:\/\/www.codexworld.com\/?p=2337"},"modified":"2017-04-20T17:09:54","modified_gmt":"2017-04-20T17:09:54","slug":"create-top-notification-bar-html-css-jquery","status":"publish","type":"post","link":"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/","title":{"rendered":"Create Top Notification Bar with HTML and CSS"},"content":{"rendered":"<p>Top Notification Bar or Hello Bar is the best way to direct your visitors and promote website&#8217;s most important content. Use top notification bar to promote products or show important notification for maximum reach. In this tutorial, we&#8217;ll show you how to <b>create a Hello bar or notification bar<\/b> for your website.<\/p>\n<p>Before you start to create a top notification bar, take a look at some benefits of placing a Hello Bar to your website.<\/p>\n<ul class=\"bullet_disk_list\">\n<li>Promote products to sell more.<\/li>\n<li>Increase social likes by placing the social media buttons.<\/li>\n<li>Display news and events to engage visitors.<\/li>\n<li>Grow subscribers by offering subscription form.<\/li>\n<\/ul>\n<p>It&#8217;s very easy to create a top fixed notification bar using HTML and CSS. Also, you can use jQuery to add a close functionality on the top navigation bar. Here we&#8217;ll provide a simple script to add a top notification bar to the website using HTML, CSS, and jQuery.<\/p>\n<h2>HTML Code<\/h2>\n<p>The following HTML shows a fixed notification bar at the top of the web page with a close icon.<\/p>\n<pre>&lt;<span style=\"color:#bf4f24\">div<\/span> <span style=\"color:#bf4f24\">id<\/span><span style=\"color:#794938\">=<\/span><span style=\"color:#0b6125\">\"hellobar-bar\"<\/span> <span style=\"color:#bf4f24\">class<\/span>=<span style=\"color:#0b6125\">\"regular closable\"<\/span>>\r\n    &lt;<span style=\"color:#bf4f24\">div<\/span> <span style=\"color:#bf4f24\">class<\/span>=<span style=\"color:#0b6125\">\"hb-content-wrapper\"<\/span>>\r\n        &lt;<span style=\"color:#bf4f24\">div<\/span> <span style=\"color:#bf4f24\">class<\/span>=<span style=\"color:#0b6125\">\"hb-text-wrapper\"<\/span>>\r\n            &lt;<span style=\"color:#bf4f24\">div<\/span> <span style=\"color:#bf4f24\">class<\/span>=<span style=\"color:#0b6125\">\"hb-headline-text\"<\/span>>\r\n                &lt;<span style=\"color:#bf4f24\">p<\/span>>&lt;<span style=\"color:#bf4f24\">span<\/span>>Register for CodexWorld Learning Week and get FREE access to 1000+ tutorials and scripts across programs&lt;\/<span style=\"color:#bf4f24\">span<\/span>>&lt;\/<span style=\"color:#bf4f24\">p<\/span>>\r\n            &lt;\/<span style=\"color:#bf4f24\">div<\/span>>\r\n        &lt;\/<span style=\"color:#bf4f24\">div<\/span>>\r\n        &lt;<span style=\"color:#bf4f24\">a<\/span> <span style=\"color:#bf4f24\">href<\/span>=<span style=\"color:#0b6125\">\"http:\/\/www.codexworld.com\"<\/span> <span style=\"color:#bf4f24\">target<\/span>=<span style=\"color:#0b6125\">\"_blank\"<\/span> <span style=\"color:#bf4f24\">class<\/span>=<span style=\"color:#0b6125\">\"hb-cta hb-cta-button\"<\/span>>\r\n            &lt;<span style=\"color:#bf4f24\">div<\/span> <span style=\"color:#bf4f24\">class<\/span>=<span style=\"color:#0b6125\">\"hb-text-holder\"<\/span>>\r\n                &lt;<span style=\"color:#bf4f24\">p<\/span>>Register Now&lt;\/<span style=\"color:#bf4f24\">p<\/span>>\r\n            &lt;\/<span style=\"color:#bf4f24\">div<\/span>>\r\n        &lt;\/<span style=\"color:#bf4f24\">a<\/span>>\r\n    &lt;\/<span style=\"color:#bf4f24\">div<\/span>>\r\n    &lt;<span style=\"color:#bf4f24\">div<\/span> <span style=\"color:#bf4f24\">class<\/span>=<span style=\"color:#0b6125\">\"hb-close-wrapper\"<\/span>>\r\n        &lt;<span style=\"color:#bf4f24\">a<\/span> <span style=\"color:#bf4f24\">href<\/span>=<span style=\"color:#0b6125\">\"javascript:void(0);\"<\/span> <span style=\"color:#bf4f24\">class<\/span>=<span style=\"color:#0b6125\">\"icon-close\"<\/span>><span style=\"color:#811f24;font-weight:700\">&amp;#10006;<\/span>&lt;\/<span style=\"color:#bf4f24\">a<\/span>>\r\n    &lt;\/<span style=\"color:#bf4f24\">div<\/span>>\r\n&lt;\/<span style=\"color:#bf4f24\">div<\/span>>\r\n<\/pre>\n<h2>CSS Code<\/h2>\n<p>The following CSS is used to design and styling the top notification bar and relative content.<\/p>\n<pre><span style=\"color:#bf4f24\">body<\/span>{\r\n    <span style=\"color:#691c97\">margin<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">0<\/span>;\r\n    <span style=\"color:#691c97\">padding<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">0<\/span>;\r\n    <span style=\"color:#691c97\">width<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">100<span style=\"color:#794938\">%<\/span><\/span>;\r\n}\r\n<span style=\"color:#bf4f24\">#hellobar-bar<\/span> {\r\n    <span style=\"color:#691c97\">font-family<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#0b6125\">\"Open Sans\"<\/span>, <span style=\"color:#b4371f\">sans-serif<\/span>;\r\n    <span style=\"color:#691c97\">width<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">100<span style=\"color:#794938\">%<\/span><\/span>;\r\n    <span style=\"color:#691c97\">margin<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">0<\/span>;\r\n    <span style=\"color:#691c97\">height<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">30<span style=\"color:#794938\">px<\/span><\/span>;\r\n    <span style=\"color:#691c97\">display<\/span><span style=\"color:#794938\">:<\/span> table;\r\n    <span style=\"color:#691c97\">font-size<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">17<span style=\"color:#794938\">px<\/span><\/span>;\r\n    <span style=\"color:#691c97\">font-weight<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">400<\/span>;\r\n    <span style=\"color:#691c97\">padding<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">.33<span style=\"color:#794938\">em<\/span><\/span> <span style=\"color:#811f24;font-weight:700\">.5<span style=\"color:#794938\">em<\/span><\/span>;\r\n    -webkit-<span style=\"color:#691c97\">font<\/span>-smoothing<span style=\"color:#794938\">:<\/span> antialiased;\r\n    <span style=\"color:#691c97\">color<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">#5c5e60<\/span>;\r\n    <span style=\"color:#691c97\">position<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">fixed<\/span>;\r\n    <span style=\"color:#691c97\">background-color<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">white<\/span>;\r\n    <span style=\"color:#691c97\">box-shadow<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">0<\/span> <span style=\"color:#811f24;font-weight:700\">1<span style=\"color:#794938\">px<\/span><\/span> <span style=\"color:#811f24;font-weight:700\">3<span style=\"color:#794938\">px<\/span><\/span> <span style=\"color:#811f24;font-weight:700\">2<span style=\"color:#794938\">px<\/span><\/span> <span style=\"color:#693a17\">rgba<\/span>(<span style=\"color:#811f24;font-weight:700\">0,0,0,0.15<\/span>);\r\n}\r\n<span style=\"color:#bf4f24\">#hellobar-bar<\/span><span style=\"color:#bf4f24\">.regular<\/span> {\r\n    <span style=\"color:#691c97\">height<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">30<span style=\"color:#794938\">px<\/span><\/span>;\r\n    <span style=\"color:#691c97\">font-size<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">14<span style=\"color:#794938\">px<\/span><\/span>;\r\n    <span style=\"color:#691c97\">padding<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">.2<span style=\"color:#794938\">em<\/span><\/span> <span style=\"color:#811f24;font-weight:700\">.5<span style=\"color:#794938\">em<\/span><\/span>;\r\n}\r\n<span style=\"color:#bf4f24\">.hb-content-wrapper<\/span> {\r\n    <span style=\"color:#691c97\">text-align<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">center<\/span>;\r\n    <span style=\"color:#691c97\">text-align<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">center<\/span>;\r\n    <span style=\"color:#691c97\">position<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">relative<\/span>;\r\n    <span style=\"color:#691c97\">display<\/span><span style=\"color:#794938\">:<\/span> table-cell;\r\n    <span style=\"color:#691c97\">vertical-align<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">middle<\/span>;\r\n}\r\n<span style=\"color:#bf4f24\">.hb-content-wrapper<\/span> <span style=\"color:#bf4f24\">p<\/span> {\r\n    <span style=\"color:#691c97\">margin-top<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">0<\/span>;\r\n    <span style=\"color:#691c97\">margin-bottom<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">0<\/span>;\r\n}\r\n<span style=\"color:#bf4f24\">.hb-text-wrapper<\/span> {\r\n    <span style=\"color:#691c97\">margin-right<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">.67<span style=\"color:#794938\">em<\/span><\/span>;\r\n    <span style=\"color:#691c97\">display<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">inline-block<\/span>;\r\n    <span style=\"color:#691c97\">line-height<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">1.3<\/span>;\r\n}\r\n<span style=\"color:#bf4f24\">.hb-text-wrapper<\/span> <span style=\"color:#bf4f24\">.hb-headline-text<\/span> {\r\n    <span style=\"color:#691c97\">font-size<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">1<span style=\"color:#794938\">em<\/span><\/span>;\r\n    <span style=\"color:#691c97\">display<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">inline-block<\/span>;\r\n    <span style=\"color:#691c97\">vertical-align<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">middle<\/span>;\r\n}\r\n<span style=\"color:#bf4f24\">#hellobar-bar<\/span> <span style=\"color:#bf4f24\">.hb-cta<\/span> {\r\n    <span style=\"color:#691c97\">display<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">inline-block<\/span>;\r\n    <span style=\"color:#691c97\">vertical-align<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">middle<\/span>;\r\n    <span style=\"color:#691c97\">margin<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">5<span style=\"color:#794938\">px<\/span><\/span> <span style=\"color:#811f24;font-weight:700\">0<\/span>;\r\n    <span style=\"color:#691c97\">color<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">#ffffff<\/span>;\r\n    <span style=\"color:#691c97\">background-color<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">#22af73<\/span>;\r\n    <span style=\"color:#691c97\">border-color<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">#22af73<\/span>\r\n}\r\n<span style=\"color:#bf4f24\">.hb-cta-button<\/span> {\r\n    <span style=\"color:#691c97\">opacity<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">1<\/span>;\r\n    <span style=\"color:#691c97\">color<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">#fff<\/span>;\r\n    <span style=\"color:#691c97\">display<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">block<\/span>;\r\n    <span style=\"color:#691c97\">cursor<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">pointer<\/span>;\r\n    <span style=\"color:#691c97\">line-height<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">1.5<\/span>;\r\n    <span style=\"color:#691c97\">max-width<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">22.5<span style=\"color:#794938\">em<\/span><\/span>;\r\n    <span style=\"color:#691c97\">text-align<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">center<\/span>;\r\n    <span style=\"color:#691c97\">position<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">relative<\/span>;\r\n    <span style=\"color:#691c97\">border-radius<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">3<span style=\"color:#794938\">px<\/span><\/span>;\r\n    <span style=\"color:#691c97\">white-space<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">nowrap<\/span>;\r\n    <span style=\"color:#691c97\">margin<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">1.75<span style=\"color:#794938\">em<\/span><\/span> <span style=\"color:#b4371f\">auto<\/span> <span style=\"color:#811f24;font-weight:700\">0<\/span>;\r\n    <span style=\"color:#691c97\">text-decoration<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">none<\/span>;\r\n    <span style=\"color:#691c97\">padding<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">0<\/span>;\r\n    <span style=\"color:#691c97\">overflow<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">hidden<\/span>;\r\n}\r\n<span style=\"color:#bf4f24\">.hb-cta-button<\/span> <span style=\"color:#bf4f24\">.hb-text-holder<\/span> {\r\n    <span style=\"color:#691c97\">border-radius<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">inherit<\/span>;\r\n    <span style=\"color:#691c97\">padding<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">5<span style=\"color:#794938\">px<\/span><\/span> <span style=\"color:#811f24;font-weight:700\">15<span style=\"color:#794938\">px<\/span><\/span>;\r\n}\r\n<span style=\"color:#bf4f24\">.hb-close-wrapper<\/span> {\r\n    <span style=\"color:#691c97\">display<\/span><span style=\"color:#794938\">:<\/span> table-cell;\r\n    <span style=\"color:#691c97\">width<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">1.6<span style=\"color:#794938\">em<\/span><\/span>;\r\n}\r\n<span style=\"color:#bf4f24\">.hb-close-wrapper<\/span> <span style=\"color:#bf4f24\">.icon-close<\/span> {\r\n    <span style=\"color:#691c97\">font-size<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">14<span style=\"color:#794938\">px<\/span><\/span>;\r\n    <span style=\"color:#691c97\">top<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">15<span style=\"color:#794938\">px<\/span><\/span>;\r\n    <span style=\"color:#691c97\">right<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">25<span style=\"color:#794938\">px<\/span><\/span>;\r\n    <span style=\"color:#691c97\">width<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">15<span style=\"color:#794938\">px<\/span><\/span>;\r\n    <span style=\"color:#691c97\">height<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">15<span style=\"color:#794938\">px<\/span><\/span>;\r\n    <span style=\"color:#691c97\">opacity<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">.3<\/span>;\r\n    <span style=\"color:#691c97\">color<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">#000<\/span>;\r\n    <span style=\"color:#691c97\">cursor<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">pointer<\/span>;\r\n    <span style=\"color:#691c97\">position<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">absolute<\/span>;\r\n    <span style=\"color:#691c97\">text-align<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">center<\/span>;\r\n    <span style=\"color:#691c97\">line-height<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">15<span style=\"color:#794938\">px<\/span><\/span>;\r\n    <span style=\"color:#691c97\">z-index<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">1000<\/span>;\r\n    <span style=\"color:#691c97\">text-decoration<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#b4371f\">none<\/span>;\r\n}\r\n<\/pre>\n<h2>Top Bar Close Functionality<\/h2>\n<p>One line of jQuery will be used to hide the top notification bar on a button (x) click.<\/p>\n<p>Since we&#8217;ll use jQuery, include the jQuery library first.  <\/p>\n<pre>&lt;<span style=\"color:#bf4f24\">script<\/span> <span style=\"color:#bf4f24\">src<\/span>=<span style=\"color:#0b6125\">\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.2.1\/jquery.min.js\"<\/span>>&lt;\/<span style=\"color:#bf4f24\">script<\/span>>\r\n<\/pre>\n<p>To hide notification bar use jQuery <code>fadeOut()<\/code> in the <code>onclick<\/code> event of the close (x) anchor link.<\/p>\n<pre>&lt;<span style=\"color:#bf4f24\">a<\/span> <span style=\"color:#bf4f24\">href<\/span>=<span style=\"color:#0b6125\">\"javascript:void(0);\"<\/span> <span style=\"color:#bf4f24\">class<\/span>=<span style=\"color:#0b6125\">\"icon-close\"<\/span> <span style=\"color:#bf4f24\">onclick<\/span>=<span style=\"color:#0b6125\">\"$('#hellobar-bar').fadeOut()\"<\/span>><span style=\"color:#811f24;font-weight:700\">&amp;#10006;<\/span>&lt;\/<span style=\"color:#bf4f24\">a<\/span>>\r\n<\/pre>\n<h2>Conclusion<\/h2>\n<p>In the example script, we&#8217;ve built a simple top notification bar with some basic content with HTML and CSS. You can change the content and style of top notification bar as per your requirement.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Top Notification Bar or Hello Bar is the best way to direct your visitors and promote website&#8217;s most important content. Use top notification bar to promote products or show important notification for maximum reach. In <\/p>\n","protected":false},"author":1,"featured_media":2338,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[130],"tags":[124,179,16],"class_list":["post-2337","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html-css","tag-css","tag-html","tag-jquery","cat-130-id","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create Top Notification Bar with HTML and CSS - CodexWorld<\/title>\n<meta name=\"description\" content=\"Fixed top notification bar with HTML and CSS - Simple script to create a top notification bar or hello bar using HTML, CSS, and jQuery.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create Top Notification Bar with HTML and CSS - CodexWorld\" \/>\n<meta property=\"og:description\" content=\"Fixed top notification bar with HTML and CSS - Simple script to create a top notification bar or hello bar using HTML, CSS, and jQuery.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/\" \/>\n<meta property=\"og:site_name\" content=\"CodexWorld\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:published_time\" content=\"2017-04-20T17:09:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/04\/fixed-top-notification-bar-html-css-jquery-codexworld.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1366\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CodexWorld\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codexworldblog\" \/>\n<meta name=\"twitter:site\" content=\"@codexworldweb\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CodexWorld\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-top-notification-bar-html-css-jquery\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-top-notification-bar-html-css-jquery\\\/\"},\"author\":{\"name\":\"CodexWorld\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\"},\"headline\":\"Create Top Notification Bar with HTML and CSS\",\"datePublished\":\"2017-04-20T17:09:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-top-notification-bar-html-css-jquery\\\/\"},\"wordCount\":285,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-top-notification-bar-html-css-jquery\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/04\\\/fixed-top-notification-bar-html-css-jquery-codexworld.png\",\"keywords\":[\"CSS\",\"HTML\",\"jQuery\"],\"articleSection\":[\"HTML&amp;CSS\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/create-top-notification-bar-html-css-jquery\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-top-notification-bar-html-css-jquery\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/create-top-notification-bar-html-css-jquery\\\/\",\"name\":\"Create Top Notification Bar with HTML and CSS - CodexWorld\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-top-notification-bar-html-css-jquery\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-top-notification-bar-html-css-jquery\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/04\\\/fixed-top-notification-bar-html-css-jquery-codexworld.png\",\"datePublished\":\"2017-04-20T17:09:54+00:00\",\"description\":\"Fixed top notification bar with HTML and CSS - Simple script to create a top notification bar or hello bar using HTML, CSS, and jQuery.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-top-notification-bar-html-css-jquery\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/create-top-notification-bar-html-css-jquery\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-top-notification-bar-html-css-jquery\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/04\\\/fixed-top-notification-bar-html-css-jquery-codexworld.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/04\\\/fixed-top-notification-bar-html-css-jquery-codexworld.png\",\"width\":1366,\"height\":768,\"caption\":\"fixed-top-notification-bar-html-css-jquery-codexworld\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-top-notification-bar-html-css-jquery\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codexworld.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Top Notification Bar with HTML and CSS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"name\":\"CodexWorld\",\"description\":\"Web &amp; Mobile App Development Company\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codexworld.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\",\"name\":\"CodexWorld\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"width\":200,\"height\":19,\"caption\":\"CodexWorld\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldweb\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/codexworld\",\"https:\\\/\\\/www.youtube.com\\\/codexworld\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\",\"name\":\"CodexWorld\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"caption\":\"CodexWorld\"},\"description\":\"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.\",\"sameAs\":[\"http:\\\/\\\/www.codexworld.com\",\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldblog\"],\"url\":\"https:\\\/\\\/www.codexworld.com\\\/author\\\/nitya192265\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create Top Notification Bar with HTML and CSS - CodexWorld","description":"Fixed top notification bar with HTML and CSS - Simple script to create a top notification bar or hello bar using HTML, CSS, and jQuery.","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:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/","og_locale":"en_US","og_type":"article","og_title":"Create Top Notification Bar with HTML and CSS - CodexWorld","og_description":"Fixed top notification bar with HTML and CSS - Simple script to create a top notification bar or hello bar using HTML, CSS, and jQuery.","og_url":"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/","og_site_name":"CodexWorld","article_publisher":"https:\/\/www.facebook.com\/codexworld","article_author":"https:\/\/www.facebook.com\/codexworld","article_published_time":"2017-04-20T17:09:54+00:00","og_image":[{"width":1366,"height":768,"url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/04\/fixed-top-notification-bar-html-css-jquery-codexworld.png","type":"image\/png"}],"author":"CodexWorld","twitter_card":"summary_large_image","twitter_creator":"@codexworldblog","twitter_site":"@codexworldweb","twitter_misc":{"Written by":"CodexWorld","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/#article","isPartOf":{"@id":"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/"},"author":{"name":"CodexWorld","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0"},"headline":"Create Top Notification Bar with HTML and CSS","datePublished":"2017-04-20T17:09:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/"},"wordCount":285,"commentCount":3,"publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"image":{"@id":"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/04\/fixed-top-notification-bar-html-css-jquery-codexworld.png","keywords":["CSS","HTML","jQuery"],"articleSection":["HTML&amp;CSS"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/","url":"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/","name":"Create Top Notification Bar with HTML and CSS - CodexWorld","isPartOf":{"@id":"https:\/\/www.codexworld.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/#primaryimage"},"image":{"@id":"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/04\/fixed-top-notification-bar-html-css-jquery-codexworld.png","datePublished":"2017-04-20T17:09:54+00:00","description":"Fixed top notification bar with HTML and CSS - Simple script to create a top notification bar or hello bar using HTML, CSS, and jQuery.","breadcrumb":{"@id":"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/#primaryimage","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/04\/fixed-top-notification-bar-html-css-jquery-codexworld.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/04\/fixed-top-notification-bar-html-css-jquery-codexworld.png","width":1366,"height":768,"caption":"fixed-top-notification-bar-html-css-jquery-codexworld"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codexworld.com\/create-top-notification-bar-html-css-jquery\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codexworld.com\/"},{"@type":"ListItem","position":2,"name":"Create Top Notification Bar with HTML and CSS"}]},{"@type":"WebSite","@id":"https:\/\/www.codexworld.com\/#website","url":"https:\/\/www.codexworld.com\/","name":"CodexWorld","description":"Web &amp; Mobile App Development Company","publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codexworld.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codexworld.com\/#organization","name":"CodexWorld","url":"https:\/\/www.codexworld.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","width":200,"height":19,"caption":"CodexWorld"},"image":{"@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldweb","https:\/\/www.linkedin.com\/company\/codexworld","https:\/\/www.youtube.com\/codexworld"]},{"@type":"Person","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0","name":"CodexWorld","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","caption":"CodexWorld"},"description":"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.","sameAs":["http:\/\/www.codexworld.com","https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldblog"],"url":"https:\/\/www.codexworld.com\/author\/nitya192265\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/04\/fixed-top-notification-bar-html-css-jquery-codexworld.png","jetpack_shortlink":"https:\/\/wp.me\/p6bxIh-BH","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/comments?post=2337"}],"version-history":[{"count":3,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2337\/revisions"}],"predecessor-version":[{"id":2341,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2337\/revisions\/2341"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media\/2338"}],"wp:attachment":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media?parent=2337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/categories?post=2337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/tags?post=2337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}