{"id":3199,"date":"2021-06-24T07:16:54","date_gmt":"2021-06-24T07:16:54","guid":{"rendered":"https:\/\/saadashraf.net\/blog\/?p=3199"},"modified":"2021-06-24T07:16:54","modified_gmt":"2021-06-24T07:16:54","slug":"how-to-make-a-sticky-footer-with-a-flexbox","status":"publish","type":"post","link":"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/","title":{"rendered":"How to Make a Sticky Footer With a Flexbox?"},"content":{"rendered":"<p>Making a sticky footer is perhaps the most widely recognized web improvement assignment you can undoubtedly settle with flexbox. Without a sticky footer, if you need more substance on the page, the footer &#8220;bounces&#8221; up to the center of the screen, which can demolish the client experience. Before flexbox, designers utilized negative edges to drive the footer down to the lower part of the page. Fortunately, we don&#8217;t need such a hack any longer!<\/p>\n<p>In this article, <strong>Web Developer Dubai<\/strong> will show you a simple strategy that permits you to make a sticky footer with a flexbox. All that&#8217;s needed is a couple of lines of code a few minutes to execute it.<\/p>\n<ol>\n<li>\n<h4>Start with the HTML<\/h4>\n<\/li>\n<\/ol>\n<p>In our HTML document, we make a heading, two passages with some lorem ipsum text, and a footer so we can without much of a stretch test the sticky footer usefulness. Open your code proofreader, make another organizer (or venture, contingent upon the code manager), and avoid the index.html document within it. Then, at that point, add the accompanying code:<\/p>\n<ol start=\"2\">\n<li>\n<h4>Add some basic styles in CSS<\/h4>\n<\/li>\n<\/ol>\n<p>To make our demo work, we should begin our CSS record for certain straightforward resets and essential styles. Notwithstanding, note that these essential styles are simply proposals and you can utilize some other styles rather than them \u2014 they are not needed for the sticky footer usefulness.<\/p>\n<ol start=\"3\">\n<li>\n<h4>Style the footer<\/h4>\n<\/li>\n<\/ol>\n<p>Presently, we add some CSS styles to the footer too, nonetheless, note that this is as yet not the sticky footer usefulness. You can change these fundamental footer styles to some other plan you like.<\/p>\n<ol start=\"4\">\n<li>\n<h4>Make the footer sticky with a flexbox<\/h4>\n<\/li>\n<\/ol>\n<p>Presently how about we see the CSS code that we need to use to make a sticky footer with flexbox. Truth be told, it is only five CSS rules. You can utilize this procedure with any sort of footer in any program that upholds flexbox. Flexbox support is very acceptable at this point; as of now all programs being used help it all around the world, and it&#8217;ll improve with time.<\/p>\n<p>Here is the code you need to add to your style.css record. Preferably, you should add this scrap before the overall footer styles<\/p>\n<p>We have additionally utilized the flex and flex-recoil properties. The flex property is a shorthand property that can remain with an alternate number of qualities. At the point when it has just one worth, it represents flex-develop that characterizes the allotment of additional room on the screen (if there is any). Along these lines, the flex: 1; decide implies that the fundamental substance (.content) ought to get all the additional room on the screen.<\/p>\n<p>To adjust this impact, we additionally utilize the flex-recoil property on the footer with a worth of 0. This property characterizes what happens when there isn&#8217;t adequate room on the screen. On the off chance that its worth is 0, it implies that this component shouldn&#8217;t recoil whatever occurs. Along these lines, we don&#8217;t need to be worried about the possibility that the footer will by one way or another vanish on the screen.<\/p>\n<h4>Take a Look at the demo<\/h4>\n<p>Presently, if you investigate the demo, you will see that the program has added the perfect measure of void area to the lower part of the substance and the footer pleasantly adheres to the lower part of the page:<\/p>\n<p>You can explore different avenues regarding adding more substance to the page also. You will see that when there isn&#8217;t any additional room on the screen and the page becomes scrollable, the footer simply acts as a normal footer. It will not adhere to the lower part of the page yet look all over with the remainder of the substance.<\/p>\n<h4>Subsequent stages<\/h4>\n<p>Flexbox is an extraordinary format module to carry out basic and complex designs and functionalities the same. It&#8217;s a smart thought to make a sticky footer regardless of whether you don&#8217;t figure you may require it, as certain clients may utilize a colossal screen on which the page can without much of a stretch run out of substance. With flexbox, it&#8217;s truly only a couple lines of additional code and requires just a negligible exertion.<\/p>\n<p><a href=\"https:\/\/www.saadashraf.net\/\"><strong>Get in touch with Freelance Web Developer Dubai<\/strong><\/a> today to get your sticky footer.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Making a sticky footer is perhaps the most widely recognized web improvement assignment you can undoubtedly settle with flexbox. Without a sticky footer, if you need more substance on the page, the footer &#8220;bounces&#8221; up to the center of the screen, which can demolish the client experience. Before flexbox, designers utilized negative edges to drive [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3200,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[34],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Make a Sticky Footer With a Flexbox? -<\/title>\n<meta name=\"description\" content=\"In this article, Web Developer Dubai will show you a simple strategy that permits you to make a sticky footer with a flexbox. All that&#039;s needed is a couple of lines of code a few minutes to execute it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Make a Sticky Footer With a Flexbox? -\" \/>\n<meta property=\"og:description\" content=\"In this article, Web Developer Dubai will show you a simple strategy that permits you to make a sticky footer with a flexbox. All that&#039;s needed is a couple of lines of code a few minutes to execute it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/\" \/>\n<meta property=\"og:site_name\" content=\"Blogs\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-24T07:16:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/saadashraf.net\/blog\/wp-content\/uploads\/2021\/06\/sticky-footer-development.png\" \/>\n\t<meta property=\"og:image:width\" content=\"636\" \/>\n\t<meta property=\"og:image:height\" content=\"335\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/saadashraf.net\/blog\/#\/schema\/person\/07c8e06409a4c41e57cc283478049b72\"},\"headline\":\"How to Make a Sticky Footer With a Flexbox?\",\"datePublished\":\"2021-06-24T07:16:54+00:00\",\"dateModified\":\"2021-06-24T07:16:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/\"},\"wordCount\":720,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/saadashraf.net\/blog\/#organization\"},\"articleSection\":[\"Web Design\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/\",\"url\":\"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/\",\"name\":\"How to Make a Sticky Footer With a Flexbox? -\",\"isPartOf\":{\"@id\":\"https:\/\/saadashraf.net\/blog\/#website\"},\"datePublished\":\"2021-06-24T07:16:54+00:00\",\"dateModified\":\"2021-06-24T07:16:54+00:00\",\"description\":\"In this article, Web Developer Dubai will show you a simple strategy that permits you to make a sticky footer with a flexbox. All that's needed is a couple of lines of code a few minutes to execute it.\",\"breadcrumb\":{\"@id\":\"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/saadashraf.net\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Make a Sticky Footer With a Flexbox?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/saadashraf.net\/blog\/#website\",\"url\":\"https:\/\/saadashraf.net\/blog\/\",\"name\":\"Blogs\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/saadashraf.net\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/saadashraf.net\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/saadashraf.net\/blog\/#organization\",\"name\":\"Saad Ashraf\",\"url\":\"https:\/\/saadashraf.net\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/saadashraf.net\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/saadashraf.net\/blog\/wp-content\/uploads\/2023\/03\/Saad-Ashraf-Logo.jpeg\",\"contentUrl\":\"https:\/\/saadashraf.net\/blog\/wp-content\/uploads\/2023\/03\/Saad-Ashraf-Logo.jpeg\",\"width\":350,\"height\":162,\"caption\":\"Saad Ashraf\"},\"image\":{\"@id\":\"https:\/\/saadashraf.net\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/saadashraf.net\/blog\/#\/schema\/person\/07c8e06409a4c41e57cc283478049b72\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/saadashraf.net\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1dd2838ca55a7e429f4853f74d0eb550?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1dd2838ca55a7e429f4853f74d0eb550?s=96&d=mm&r=g\",\"caption\":\"admin\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Make a Sticky Footer With a Flexbox? -","description":"In this article, Web Developer Dubai will show you a simple strategy that permits you to make a sticky footer with a flexbox. All that's needed is a couple of lines of code a few minutes to execute it.","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:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/","og_locale":"en_US","og_type":"article","og_title":"How to Make a Sticky Footer With a Flexbox? -","og_description":"In this article, Web Developer Dubai will show you a simple strategy that permits you to make a sticky footer with a flexbox. All that's needed is a couple of lines of code a few minutes to execute it.","og_url":"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/","og_site_name":"Blogs","article_published_time":"2021-06-24T07:16:54+00:00","og_image":[{"width":636,"height":335,"url":"https:\/\/saadashraf.net\/blog\/wp-content\/uploads\/2021\/06\/sticky-footer-development.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/#article","isPartOf":{"@id":"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/"},"author":{"name":"admin","@id":"https:\/\/saadashraf.net\/blog\/#\/schema\/person\/07c8e06409a4c41e57cc283478049b72"},"headline":"How to Make a Sticky Footer With a Flexbox?","datePublished":"2021-06-24T07:16:54+00:00","dateModified":"2021-06-24T07:16:54+00:00","mainEntityOfPage":{"@id":"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/"},"wordCount":720,"commentCount":0,"publisher":{"@id":"https:\/\/saadashraf.net\/blog\/#organization"},"articleSection":["Web Design"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/","url":"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/","name":"How to Make a Sticky Footer With a Flexbox? -","isPartOf":{"@id":"https:\/\/saadashraf.net\/blog\/#website"},"datePublished":"2021-06-24T07:16:54+00:00","dateModified":"2021-06-24T07:16:54+00:00","description":"In this article, Web Developer Dubai will show you a simple strategy that permits you to make a sticky footer with a flexbox. All that's needed is a couple of lines of code a few minutes to execute it.","breadcrumb":{"@id":"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/saadashraf.net\/blog\/how-to-make-a-sticky-footer-with-a-flexbox\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/saadashraf.net\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Make a Sticky Footer With a Flexbox?"}]},{"@type":"WebSite","@id":"https:\/\/saadashraf.net\/blog\/#website","url":"https:\/\/saadashraf.net\/blog\/","name":"Blogs","description":"","publisher":{"@id":"https:\/\/saadashraf.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/saadashraf.net\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/saadashraf.net\/blog\/#organization","name":"Saad Ashraf","url":"https:\/\/saadashraf.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/saadashraf.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/saadashraf.net\/blog\/wp-content\/uploads\/2023\/03\/Saad-Ashraf-Logo.jpeg","contentUrl":"https:\/\/saadashraf.net\/blog\/wp-content\/uploads\/2023\/03\/Saad-Ashraf-Logo.jpeg","width":350,"height":162,"caption":"Saad Ashraf"},"image":{"@id":"https:\/\/saadashraf.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/saadashraf.net\/blog\/#\/schema\/person\/07c8e06409a4c41e57cc283478049b72","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/saadashraf.net\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1dd2838ca55a7e429f4853f74d0eb550?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1dd2838ca55a7e429f4853f74d0eb550?s=96&d=mm&r=g","caption":"admin"}}]}},"_links":{"self":[{"href":"https:\/\/saadashraf.net\/blog\/wp-json\/wp\/v2\/posts\/3199"}],"collection":[{"href":"https:\/\/saadashraf.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/saadashraf.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/saadashraf.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/saadashraf.net\/blog\/wp-json\/wp\/v2\/comments?post=3199"}],"version-history":[{"count":2,"href":"https:\/\/saadashraf.net\/blog\/wp-json\/wp\/v2\/posts\/3199\/revisions"}],"predecessor-version":[{"id":3202,"href":"https:\/\/saadashraf.net\/blog\/wp-json\/wp\/v2\/posts\/3199\/revisions\/3202"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/saadashraf.net\/blog\/wp-json\/wp\/v2\/media\/3200"}],"wp:attachment":[{"href":"https:\/\/saadashraf.net\/blog\/wp-json\/wp\/v2\/media?parent=3199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/saadashraf.net\/blog\/wp-json\/wp\/v2\/categories?post=3199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/saadashraf.net\/blog\/wp-json\/wp\/v2\/tags?post=3199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}