Change CSS for navigation barLeft navigation bar on pagesLayered navigation doesn't appear in mobile view...

Has any human ever had the choice to leave Earth permanently?

Cookies - Should the toggles be on?

How does Leonard in "Memento" remember reading and writing?

Calculate the number of points of an elliptic curve in medium Weierstrass form over finite field

What are "industrial chops"?

Why would space fleets be aligned?

What is the purpose of easy combat scenarios that don't need resource expenditure?

Non-Cancer terminal illness that can affect young (age 10-13) girls?

It took me a lot of time to make this, pls like. (YouTube Comments #1)

What would the chemical name be for C13H8Cl3NO

Construct transition probability matrix for markov chain

How to make ice magic work from a scientific point of view?

What does it mean for a caliber to be flat shooting?

Graph with overlapping labels

What incentives do banks have to gather up loans into pools (backed by Ginnie Mae)and selling them?

Why did the villain in the first Men in Black movie care about Earth's Cockroaches?

Citing paywalled articles accessed via illegal web sharing

How to read 火日参拾月参

Increment each digit in a number to form a new number

Salesforce package error error “You can't specify version for namespace sf_com_apps because this namespace is not installed to your organization.”

Should I reinstall Linux when changing the laptop's CPU?

What are the exceptions to Natural Selection?

Use two 8s and two 3s to make the number 24

Is it possible to grant users sftp access without shell access? If yes, how is it implemented?



Change CSS for navigation bar


Left navigation bar on pagesLayered navigation doesn't appear in mobile view (Magento 2)Magento Navigation Menu - Sub NavigationMagento 2 CSS Media Queries not working onMagento 2 - Change positions of the navigation submenuWhere is the JS file located to change the aria-expanded=true in Magento 2magento 2 extend theme only on desktopChange CSS style for price (tag)Magento 2 CE : Add child navigation items to navigation menuMagento 2 - Change top navigation submenu position













0















I'm using the Luma theme. I would like to change the padding for the a-tag tag used in the navigation submenu. I can change the backgroundcolor of the items (li) like this,



@navigation-desktop-level0-item__active__color: @navigation-desktop-level0-item__color;,



but not the padding of the a-tag within the li-tag. Can anyone help me?










share|improve this question





























    0















    I'm using the Luma theme. I would like to change the padding for the a-tag tag used in the navigation submenu. I can change the backgroundcolor of the items (li) like this,



    @navigation-desktop-level0-item__active__color: @navigation-desktop-level0-item__color;,



    but not the padding of the a-tag within the li-tag. Can anyone help me?










    share|improve this question



























      0












      0








      0








      I'm using the Luma theme. I would like to change the padding for the a-tag tag used in the navigation submenu. I can change the backgroundcolor of the items (li) like this,



      @navigation-desktop-level0-item__active__color: @navigation-desktop-level0-item__color;,



      but not the padding of the a-tag within the li-tag. Can anyone help me?










      share|improve this question
















      I'm using the Luma theme. I would like to change the padding for the a-tag tag used in the navigation submenu. I can change the backgroundcolor of the items (li) like this,



      @navigation-desktop-level0-item__active__color: @navigation-desktop-level0-item__color;,



      but not the padding of the a-tag within the li-tag. Can anyone help me?







      magento2 css navigation less






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 25 '16 at 15:25









      Klettseb

      3,05031751




      3,05031751










      asked Feb 25 '16 at 15:22









      OmitriOmitri

      781312




      781312






















          2 Answers
          2






          active

          oldest

          votes


















          1














          Use the developer tools of Chrome to identify the CSS you want to change. Using the map files generated, you should be able to use to identify the LESS code causing the problem.



          Source maps should be automatically generated when using grunt. Consult the front-end dev docs on how to setup grunt.



          There you might either find a configuration variable you just have to change or you have two options:




          1. Copy the .less file to your theme and adapt it

          2. Add own LESS code in your theme with a more specific CSS selector to overwrite the core CSS/LESS.


          I currently use option 1. Because it keeps the LESS code more structured. The downside is that it is necessary to copy and maintain core code.
          I first commit the unmodified copy of the .less file to git, to later track my own changes.






          share|improve this answer


























          • Can you tell him where to put the sourcemap configuration. All that was mentioned on this was to use source map. They need first to be generated. Be sure not to add them to git repository because then production will have them as well.

            – camdixon
            Jul 3 '16 at 15:26



















          -1














          The way I add styles that are not included in the basic .less files is to add them using regular css.



          Add into the header for: magento/app/design/frontend/Company_name/theme_name/Magento_Theme/layout/default.xml



          <head>
          <css src="Magento_Theme::css/css_file_name.css"/>
          </head>


          And then add your styles into the file at: magento/app/design/frontend/Company_name/theme_name/Magento_Theme/web/css_file_name.css



          In your case, it could be:



          .navigation li.ui-menu-item a {
          padding: 5px;
          }





          share|improve this answer


























          • But then you give up all the powers of LESS

            – Alex
            Jul 3 '16 at 13:11













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "479"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f103505%2fchange-css-for-navigation-bar%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Use the developer tools of Chrome to identify the CSS you want to change. Using the map files generated, you should be able to use to identify the LESS code causing the problem.



          Source maps should be automatically generated when using grunt. Consult the front-end dev docs on how to setup grunt.



          There you might either find a configuration variable you just have to change or you have two options:




          1. Copy the .less file to your theme and adapt it

          2. Add own LESS code in your theme with a more specific CSS selector to overwrite the core CSS/LESS.


          I currently use option 1. Because it keeps the LESS code more structured. The downside is that it is necessary to copy and maintain core code.
          I first commit the unmodified copy of the .less file to git, to later track my own changes.






          share|improve this answer


























          • Can you tell him where to put the sourcemap configuration. All that was mentioned on this was to use source map. They need first to be generated. Be sure not to add them to git repository because then production will have them as well.

            – camdixon
            Jul 3 '16 at 15:26
















          1














          Use the developer tools of Chrome to identify the CSS you want to change. Using the map files generated, you should be able to use to identify the LESS code causing the problem.



          Source maps should be automatically generated when using grunt. Consult the front-end dev docs on how to setup grunt.



          There you might either find a configuration variable you just have to change or you have two options:




          1. Copy the .less file to your theme and adapt it

          2. Add own LESS code in your theme with a more specific CSS selector to overwrite the core CSS/LESS.


          I currently use option 1. Because it keeps the LESS code more structured. The downside is that it is necessary to copy and maintain core code.
          I first commit the unmodified copy of the .less file to git, to later track my own changes.






          share|improve this answer


























          • Can you tell him where to put the sourcemap configuration. All that was mentioned on this was to use source map. They need first to be generated. Be sure not to add them to git repository because then production will have them as well.

            – camdixon
            Jul 3 '16 at 15:26














          1












          1








          1







          Use the developer tools of Chrome to identify the CSS you want to change. Using the map files generated, you should be able to use to identify the LESS code causing the problem.



          Source maps should be automatically generated when using grunt. Consult the front-end dev docs on how to setup grunt.



          There you might either find a configuration variable you just have to change or you have two options:




          1. Copy the .less file to your theme and adapt it

          2. Add own LESS code in your theme with a more specific CSS selector to overwrite the core CSS/LESS.


          I currently use option 1. Because it keeps the LESS code more structured. The downside is that it is necessary to copy and maintain core code.
          I first commit the unmodified copy of the .less file to git, to later track my own changes.






          share|improve this answer















          Use the developer tools of Chrome to identify the CSS you want to change. Using the map files generated, you should be able to use to identify the LESS code causing the problem.



          Source maps should be automatically generated when using grunt. Consult the front-end dev docs on how to setup grunt.



          There you might either find a configuration variable you just have to change or you have two options:




          1. Copy the .less file to your theme and adapt it

          2. Add own LESS code in your theme with a more specific CSS selector to overwrite the core CSS/LESS.


          I currently use option 1. Because it keeps the LESS code more structured. The downside is that it is necessary to copy and maintain core code.
          I first commit the unmodified copy of the .less file to git, to later track my own changes.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 29 mins ago









          Teja Bhagavan Kollepara

          2,96341847




          2,96341847










          answered Jul 3 '16 at 13:16









          AlexAlex

          9,5811754113




          9,5811754113













          • Can you tell him where to put the sourcemap configuration. All that was mentioned on this was to use source map. They need first to be generated. Be sure not to add them to git repository because then production will have them as well.

            – camdixon
            Jul 3 '16 at 15:26



















          • Can you tell him where to put the sourcemap configuration. All that was mentioned on this was to use source map. They need first to be generated. Be sure not to add them to git repository because then production will have them as well.

            – camdixon
            Jul 3 '16 at 15:26

















          Can you tell him where to put the sourcemap configuration. All that was mentioned on this was to use source map. They need first to be generated. Be sure not to add them to git repository because then production will have them as well.

          – camdixon
          Jul 3 '16 at 15:26





          Can you tell him where to put the sourcemap configuration. All that was mentioned on this was to use source map. They need first to be generated. Be sure not to add them to git repository because then production will have them as well.

          – camdixon
          Jul 3 '16 at 15:26













          -1














          The way I add styles that are not included in the basic .less files is to add them using regular css.



          Add into the header for: magento/app/design/frontend/Company_name/theme_name/Magento_Theme/layout/default.xml



          <head>
          <css src="Magento_Theme::css/css_file_name.css"/>
          </head>


          And then add your styles into the file at: magento/app/design/frontend/Company_name/theme_name/Magento_Theme/web/css_file_name.css



          In your case, it could be:



          .navigation li.ui-menu-item a {
          padding: 5px;
          }





          share|improve this answer


























          • But then you give up all the powers of LESS

            – Alex
            Jul 3 '16 at 13:11


















          -1














          The way I add styles that are not included in the basic .less files is to add them using regular css.



          Add into the header for: magento/app/design/frontend/Company_name/theme_name/Magento_Theme/layout/default.xml



          <head>
          <css src="Magento_Theme::css/css_file_name.css"/>
          </head>


          And then add your styles into the file at: magento/app/design/frontend/Company_name/theme_name/Magento_Theme/web/css_file_name.css



          In your case, it could be:



          .navigation li.ui-menu-item a {
          padding: 5px;
          }





          share|improve this answer


























          • But then you give up all the powers of LESS

            – Alex
            Jul 3 '16 at 13:11
















          -1












          -1








          -1







          The way I add styles that are not included in the basic .less files is to add them using regular css.



          Add into the header for: magento/app/design/frontend/Company_name/theme_name/Magento_Theme/layout/default.xml



          <head>
          <css src="Magento_Theme::css/css_file_name.css"/>
          </head>


          And then add your styles into the file at: magento/app/design/frontend/Company_name/theme_name/Magento_Theme/web/css_file_name.css



          In your case, it could be:



          .navigation li.ui-menu-item a {
          padding: 5px;
          }





          share|improve this answer















          The way I add styles that are not included in the basic .less files is to add them using regular css.



          Add into the header for: magento/app/design/frontend/Company_name/theme_name/Magento_Theme/layout/default.xml



          <head>
          <css src="Magento_Theme::css/css_file_name.css"/>
          </head>


          And then add your styles into the file at: magento/app/design/frontend/Company_name/theme_name/Magento_Theme/web/css_file_name.css



          In your case, it could be:



          .navigation li.ui-menu-item a {
          padding: 5px;
          }






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 6 '16 at 7:33









          Raphael at Digital Pianism

          54.4k22118276




          54.4k22118276










          answered Apr 6 '16 at 7:09









          David ChuDavid Chu

          1




          1













          • But then you give up all the powers of LESS

            – Alex
            Jul 3 '16 at 13:11





















          • But then you give up all the powers of LESS

            – Alex
            Jul 3 '16 at 13:11



















          But then you give up all the powers of LESS

          – Alex
          Jul 3 '16 at 13:11







          But then you give up all the powers of LESS

          – Alex
          Jul 3 '16 at 13:11




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f103505%2fchange-css-for-navigation-bar%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

          How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

          夢乃愛華...