{"id":13111189,"date":"2020-07-12T13:17:32","date_gmt":"2020-07-12T13:17:32","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/how-to-remove-padding-from-top-nav\/"},"modified":"2020-07-12T13:37:02","modified_gmt":"2020-07-12T13:37:02","slug":"how-to-remove-padding-from-top-nav","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/how-to-remove-padding-from-top-nav\/","title":{"rendered":"How To Remove Padding From Top Nav"},"content":{"rendered":"<p>Hi All!<\/p>\n<p>I am struggling to remove some default padding around the top nav. I have tried to 0 out padding and I used the !important but still no change. Here&#8217;s my code so far.<\/p>\n<pre><code>&lt;?php\n\/**\n * The header for our theme\n *\n * This is the template that displays all of the &lt;head&gt; section and everything up until &lt;div id=&quot;content&quot;&gt;\n *\n * @link https:\/\/developer.wordpress.org\/themes\/basics\/template-files\/#template-partials\n *\n * @package Nifet Health\n *\/\n\n ?&gt;\n\n&lt;!DOCTYPE html&gt;\n&lt;html &lt;?php language_attributes(); ?&gt;&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;&lt;?php bloginfo( &#039;charset&#039; ) ?&gt;&quot;&gt;\n    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;\n    &lt;link rel=&quot;profile&quot; href=&quot;https:\/\/gmpg.org\/xfn\/11&quot; \/&gt;\n    &lt;?php wp_head(); ?&gt;\n&lt;\/head&gt;\n&lt;body &lt;?php body_class(); ?&gt;&gt;  \n      &lt;header&gt;\n          &lt;div class=&quot;top-nav&quot;&gt;\n              &lt;p&gt;Sign in&lt;\/p&gt;\n              &lt;p&gt;Register&lt;\/p&gt;\n          &lt;\/div&gt;\n\n          &lt;div class=&quot;container&quot;&gt;\n              &lt;div class=&quot;row&quot;&gt;\n                  &lt;div class=&quot;col-4&quot;&gt;Logo&lt;\/div&gt;\n                  &lt;div class=&quot;col-4&quot;&gt;Search&lt;\/div&gt;\n                  &lt;div class=&quot;col-4&quot;&gt;Cart &amp; Account&lt;\/div&gt;\n              &lt;\/div&gt;\n          &lt;\/div&gt;\n      &lt;\/header&gt;\n\n      &lt;nav class=&quot;navbar&quot;&gt;\n          &lt;?php \n\n          wp_nav_menu(\n              array(\n                  &#039;theme_location&#039;    =&gt;   &#039;nifet_health_main_menu&#039;\n              )\n          );\n\n          ?&gt;\n      &lt;\/nav&gt;<\/code><\/pre>\n<p>And the css<\/p>\n<pre><code> \/* Styling navbar *\/\n .top-nav {\n\t display: flex;\n\t color: #fff;\n\t align-items: center;\n\t justify-content: flex-end;\n\t padding-bottom: 0 !important;\n\t padding-top: 0 !important;\n }\n\n #menu-nifet-health-main-menu a:hover {\n\t background: red;\n }\n\n #menu-nifet-health-main-menu {\n\t display: flex;\n\t list-style-type: none;\n }\n\n #menu-nifet-health-main-menu a {\n\t color: #fff;\n }\n\n .navbar {\n\t background: #037DA4;\n\t padding-bottom: 1rem;\n }<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-13111189","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/13111189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/13111189\/revisions"}],"predecessor-version":[{"id":13111211,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/13111189\/revisions\/13111211"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=13111189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}