Bootstrap 4 navbar brand - is it possible to use a different logo at a smaller breakpoint?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







-1















I have the following header logo that looks good in medium and larger sizes, but is inappropriate for smaller screens:



enter image description here



I can't use a responsive image, because, assuming I'm reading the documentation correctly, Bootstrap simply shrinks the width while leaving the height the same. I'm afraid the text would simply be unreadable as the width of the image is further and further constrained.



Ideally, I'd replace this logo with a smaller one at the medium break point. Is that possible?










share|improve this question





























    -1















    I have the following header logo that looks good in medium and larger sizes, but is inappropriate for smaller screens:



    enter image description here



    I can't use a responsive image, because, assuming I'm reading the documentation correctly, Bootstrap simply shrinks the width while leaving the height the same. I'm afraid the text would simply be unreadable as the width of the image is further and further constrained.



    Ideally, I'd replace this logo with a smaller one at the medium break point. Is that possible?










    share|improve this question

























      -1












      -1








      -1








      I have the following header logo that looks good in medium and larger sizes, but is inappropriate for smaller screens:



      enter image description here



      I can't use a responsive image, because, assuming I'm reading the documentation correctly, Bootstrap simply shrinks the width while leaving the height the same. I'm afraid the text would simply be unreadable as the width of the image is further and further constrained.



      Ideally, I'd replace this logo with a smaller one at the medium break point. Is that possible?










      share|improve this question














      I have the following header logo that looks good in medium and larger sizes, but is inappropriate for smaller screens:



      enter image description here



      I can't use a responsive image, because, assuming I'm reading the documentation correctly, Bootstrap simply shrinks the width while leaving the height the same. I'm afraid the text would simply be unreadable as the width of the image is further and further constrained.



      Ideally, I'd replace this logo with a smaller one at the medium break point. Is that possible?







      html css bootstrap-4






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 23 '18 at 18:59









      Major ProductionsMajor Productions

      3,031956125




      3,031956125
























          1 Answer
          1






          active

          oldest

          votes


















          2














          Perhaps not the most elegant but quick and easy: Have two brand images, hide and show as appropriate using Bootstrap utility display classes.



          https://getbootstrap.com/docs/4.1/utilities/display/



          Ex something like (I assume you're using .navbar-brand but the same technique works regardless):



          <a class="navbar-brand" href="#">
          <img src="logo-small.jpg" alt="Logo small" class="d-lg-none">
          <img src="logo-large.jpg" alt="Logo large" class="d-none d-lg-block">
          </a>


          This would show the small logo at sizes xs, sm & md, and large logo at lg & xl.






          share|improve this answer





















          • 3





            You don't need the xl declarations. d-lg-none (and up) is implicit. And yes, two links makes no sense as well. Just two img declarations

            – Jonathan
            Nov 23 '18 at 19:12








          • 3





            Also don't need two links afaik.

            – Havenard
            Nov 23 '18 at 19:12











          • Thanks for those tips, I was apparently trying to go too fast :)

            – emmzee
            Nov 23 '18 at 19:16












          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          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: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2fstackoverflow.com%2fquestions%2f53451774%2fbootstrap-4-navbar-brand-is-it-possible-to-use-a-different-logo-at-a-smaller-b%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Perhaps not the most elegant but quick and easy: Have two brand images, hide and show as appropriate using Bootstrap utility display classes.



          https://getbootstrap.com/docs/4.1/utilities/display/



          Ex something like (I assume you're using .navbar-brand but the same technique works regardless):



          <a class="navbar-brand" href="#">
          <img src="logo-small.jpg" alt="Logo small" class="d-lg-none">
          <img src="logo-large.jpg" alt="Logo large" class="d-none d-lg-block">
          </a>


          This would show the small logo at sizes xs, sm & md, and large logo at lg & xl.






          share|improve this answer





















          • 3





            You don't need the xl declarations. d-lg-none (and up) is implicit. And yes, two links makes no sense as well. Just two img declarations

            – Jonathan
            Nov 23 '18 at 19:12








          • 3





            Also don't need two links afaik.

            – Havenard
            Nov 23 '18 at 19:12











          • Thanks for those tips, I was apparently trying to go too fast :)

            – emmzee
            Nov 23 '18 at 19:16
















          2














          Perhaps not the most elegant but quick and easy: Have two brand images, hide and show as appropriate using Bootstrap utility display classes.



          https://getbootstrap.com/docs/4.1/utilities/display/



          Ex something like (I assume you're using .navbar-brand but the same technique works regardless):



          <a class="navbar-brand" href="#">
          <img src="logo-small.jpg" alt="Logo small" class="d-lg-none">
          <img src="logo-large.jpg" alt="Logo large" class="d-none d-lg-block">
          </a>


          This would show the small logo at sizes xs, sm & md, and large logo at lg & xl.






          share|improve this answer





















          • 3





            You don't need the xl declarations. d-lg-none (and up) is implicit. And yes, two links makes no sense as well. Just two img declarations

            – Jonathan
            Nov 23 '18 at 19:12








          • 3





            Also don't need two links afaik.

            – Havenard
            Nov 23 '18 at 19:12











          • Thanks for those tips, I was apparently trying to go too fast :)

            – emmzee
            Nov 23 '18 at 19:16














          2












          2








          2







          Perhaps not the most elegant but quick and easy: Have two brand images, hide and show as appropriate using Bootstrap utility display classes.



          https://getbootstrap.com/docs/4.1/utilities/display/



          Ex something like (I assume you're using .navbar-brand but the same technique works regardless):



          <a class="navbar-brand" href="#">
          <img src="logo-small.jpg" alt="Logo small" class="d-lg-none">
          <img src="logo-large.jpg" alt="Logo large" class="d-none d-lg-block">
          </a>


          This would show the small logo at sizes xs, sm & md, and large logo at lg & xl.






          share|improve this answer















          Perhaps not the most elegant but quick and easy: Have two brand images, hide and show as appropriate using Bootstrap utility display classes.



          https://getbootstrap.com/docs/4.1/utilities/display/



          Ex something like (I assume you're using .navbar-brand but the same technique works regardless):



          <a class="navbar-brand" href="#">
          <img src="logo-small.jpg" alt="Logo small" class="d-lg-none">
          <img src="logo-large.jpg" alt="Logo large" class="d-none d-lg-block">
          </a>


          This would show the small logo at sizes xs, sm & md, and large logo at lg & xl.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 23 '18 at 19:16

























          answered Nov 23 '18 at 19:09









          emmzeeemmzee

          340311




          340311








          • 3





            You don't need the xl declarations. d-lg-none (and up) is implicit. And yes, two links makes no sense as well. Just two img declarations

            – Jonathan
            Nov 23 '18 at 19:12








          • 3





            Also don't need two links afaik.

            – Havenard
            Nov 23 '18 at 19:12











          • Thanks for those tips, I was apparently trying to go too fast :)

            – emmzee
            Nov 23 '18 at 19:16














          • 3





            You don't need the xl declarations. d-lg-none (and up) is implicit. And yes, two links makes no sense as well. Just two img declarations

            – Jonathan
            Nov 23 '18 at 19:12








          • 3





            Also don't need two links afaik.

            – Havenard
            Nov 23 '18 at 19:12











          • Thanks for those tips, I was apparently trying to go too fast :)

            – emmzee
            Nov 23 '18 at 19:16








          3




          3





          You don't need the xl declarations. d-lg-none (and up) is implicit. And yes, two links makes no sense as well. Just two img declarations

          – Jonathan
          Nov 23 '18 at 19:12







          You don't need the xl declarations. d-lg-none (and up) is implicit. And yes, two links makes no sense as well. Just two img declarations

          – Jonathan
          Nov 23 '18 at 19:12






          3




          3





          Also don't need two links afaik.

          – Havenard
          Nov 23 '18 at 19:12





          Also don't need two links afaik.

          – Havenard
          Nov 23 '18 at 19:12













          Thanks for those tips, I was apparently trying to go too fast :)

          – emmzee
          Nov 23 '18 at 19:16





          Thanks for those tips, I was apparently trying to go too fast :)

          – emmzee
          Nov 23 '18 at 19:16




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • 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%2fstackoverflow.com%2fquestions%2f53451774%2fbootstrap-4-navbar-brand-is-it-possible-to-use-a-different-logo-at-a-smaller-b%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







          這個網誌中的熱門文章

          Academy of Television Arts & Sciences

          L'Équipe

          1995 France bombings