{"id":131,"date":"2021-11-09T23:32:40","date_gmt":"2021-11-09T23:32:40","guid":{"rendered":"https:\/\/www.englishqu.com\/zone\/?p=131"},"modified":"2022-06-14T12:34:29","modified_gmt":"2022-06-14T04:34:29","slug":"how-to-create-sticky-header-for-astra-free","status":"publish","type":"post","link":"https:\/\/www.englishqu.com\/zone\/how-to-create-sticky-header-for-astra-free\/","title":{"rendered":"How To Create a Sticky Header for Astra Free WordPress Theme"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Tech<\/strong>&#8211; A Sticky headers for the Astra theme is available for pro version only, but you may not worry, you can still create sticky header on your website with its free version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><a href=\"https:\/\/wpastra.com\/pricing\/\" target=\"_blank\" rel=\"noopener\">Astra theme<\/a><\/strong> is considered the best among free WordPress theme offered out there. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The theme is not only lightweighted, but easily to customize. You don&#8217;t need Tech expert skills to use this theme since it doesn&#8217;t require you to add a lot codes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Furthermore, it has many features that you can adjust to your website effortlessly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But despite having thoses features, its free version doesn&#8217;t give you Sticky Header. So you must find an alternative to make sticky header works on your website.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create Sticky Header for Astra Free WordPress Theme Using CSS Code<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Adding CSS code to custom\/additional CSS field is an alternative for you to have a sticky header in free Astra theme.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To add it, you can click Customize &gt; Additional CSS. Copy and paste the following code.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/*Make Header Sticky - for Astra prior to 3.0*\/\n.main-header-bar {\n    position: fixed;\n    top: 0;\n    width: 100%;\n}\n\n\/*Adjust Content Padding*\/\n.site-content {\n    padding-top: 75px;\n}\n\n\/*Adjust Content Padding for Mobile*\/\n@media (max-width: 800px) {\n    .site-content {\n        padding-top: 175px;\n    }\n\t\/*Stick the Off-Canvas Navigation Menu - Adjust Top Margin for your Layout*\/\n\t\t.main-navigation {\n\t\t\t\tposition: fixed;\n\t\t\t\tmargin-top: 0px;\n\t}\n}\n\n\/*Adjust Content Padding for Mobile*\/\n@media (max-width: 650px) {\n    .site-content {\n        padding-top: 200px;\n    }\n\t\/*Stick the Off-Canvas Navigation Menu - Adjust Top Margin for your Layout*\/\n\t\t.main-navigation {\n\t\t\t\tposition: fixed;\n\t\t\t\tmargin-top: 60px;\n\t}\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Adjust the code with your customizer setting<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After adding the code, view your website and adjust the padding if it suits to your Customizer setting.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>You May Read: <a href=\"https:\/\/www.englishqu.com\/zone\/create-sticky-header-for-oceanwp-free-theme\/\">How To Create Sticky Header for OceanWP Free Theme<\/a> <\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The code above is the latest CSS code to create Sticky header for Astra free theme. It has adjusted to the off-canvas mobile menu website, so when it is clicked, the drop-down menu appears to be integrated with the header.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This trick might be helpful for you to create Sticky for Astra free theme. Still, we recommend you to buy the Pro version.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tech&#8211; A Sticky headers for the Astra theme is available for pro version only, but&#8230;<\/p>\n","protected":false},"author":1,"featured_media":136,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[12,13],"newstopic":[],"class_list":["post-131","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-astra-theme","tag-sticky-header"],"_links":{"self":[{"href":"https:\/\/www.englishqu.com\/zone\/wp-json\/wp\/v2\/posts\/131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.englishqu.com\/zone\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.englishqu.com\/zone\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.englishqu.com\/zone\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.englishqu.com\/zone\/wp-json\/wp\/v2\/comments?post=131"}],"version-history":[{"count":9,"href":"https:\/\/www.englishqu.com\/zone\/wp-json\/wp\/v2\/posts\/131\/revisions"}],"predecessor-version":[{"id":560,"href":"https:\/\/www.englishqu.com\/zone\/wp-json\/wp\/v2\/posts\/131\/revisions\/560"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.englishqu.com\/zone\/wp-json\/wp\/v2\/media\/136"}],"wp:attachment":[{"href":"https:\/\/www.englishqu.com\/zone\/wp-json\/wp\/v2\/media?parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.englishqu.com\/zone\/wp-json\/wp\/v2\/categories?post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.englishqu.com\/zone\/wp-json\/wp\/v2\/tags?post=131"},{"taxonomy":"newstopic","embeddable":true,"href":"https:\/\/www.englishqu.com\/zone\/wp-json\/wp\/v2\/newstopic?post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}