Make Image overflow the hero element and align to the bottom-right












0















My Code: https://jsfiddle.net/jqno1x6p/



I have this code, at the top, I have a hero element where I would like to place an image at the bottom-right section of the hero element and then overflow into the next section. I am not sure how to accomplish this.



Here is how my Hero element is set up:



<div class="hero-image">
<img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
<div class="hero-text">
<h1>Tennant management, <span class="emphasize">innovated.</span></h1>
</div>
</div>









share|improve this question



























    0















    My Code: https://jsfiddle.net/jqno1x6p/



    I have this code, at the top, I have a hero element where I would like to place an image at the bottom-right section of the hero element and then overflow into the next section. I am not sure how to accomplish this.



    Here is how my Hero element is set up:



    <div class="hero-image">
    <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
    <div class="hero-text">
    <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
    </div>
    </div>









    share|improve this question

























      0












      0








      0








      My Code: https://jsfiddle.net/jqno1x6p/



      I have this code, at the top, I have a hero element where I would like to place an image at the bottom-right section of the hero element and then overflow into the next section. I am not sure how to accomplish this.



      Here is how my Hero element is set up:



      <div class="hero-image">
      <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
      <div class="hero-text">
      <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
      </div>
      </div>









      share|improve this question














      My Code: https://jsfiddle.net/jqno1x6p/



      I have this code, at the top, I have a hero element where I would like to place an image at the bottom-right section of the hero element and then overflow into the next section. I am not sure how to accomplish this.



      Here is how my Hero element is set up:



      <div class="hero-image">
      <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
      <div class="hero-text">
      <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
      </div>
      </div>






      html css






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 14 '18 at 1:59







      user5971386































          1 Answer
          1






          active

          oldest

          votes


















          0














          Not sure what do you mean by overflow into the next section... you can set the overflow:hidden on hero-image class, to hide the overflown portion of the image:






          .hero-image {
          overflow:hidden; // <-- hide the overflow
          }

          <html>
          <head>
          <title>test</title>
          <link rel="stylesheet" type="text/css" href="style.css" />
          </head>
          <body>

          <nav class="navbar">
          <span class="brand"><a href="index.php">tensys</a></span>
          <ul class="nav-list">
          <li class="nav-link left"><a href="">Home</a></li>
          <li class="nav-link left"><a href="">Our Story</a></li>
          <li class="nav-link right"><a href="">Services</a></li>
          <li class="nav-link right"><a href="">Client Portal</a></li>
          </ul>
          </nav>

          <div class="hero-image">
          <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
          <div class="hero-text">
          <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
          </div>
          </div>
          </body>
          </html>





          A different approach (and perhaps better one) would be to fit the image to your page, by setting the image width equal to your page width - the height would be adjusted:






          img {
          width: 100%;
          }

          <html>
          <head>
          <title>test</title>
          <link rel="stylesheet" type="text/css" href="style.css" />
          </head>
          <body>

          <nav class="navbar">
          <span class="brand"><a href="index.php">tensys</a></span>
          <ul class="nav-list">
          <li class="nav-link left"><a href="">Home</a></li>
          <li class="nav-link left"><a href="">Our Story</a></li>
          <li class="nav-link right"><a href="">Services</a></li>
          <li class="nav-link right"><a href="">Client Portal</a></li>
          </ul>
          </nav>

          <div class="hero-image" style="overflow:hidden">
          <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
          <div class="hero-text">
          <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
          </div>
          </div>
          </body>
          </html>








          share|improve this answer

























            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%2f53292125%2fmake-image-overflow-the-hero-element-and-align-to-the-bottom-right%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









            0














            Not sure what do you mean by overflow into the next section... you can set the overflow:hidden on hero-image class, to hide the overflown portion of the image:






            .hero-image {
            overflow:hidden; // <-- hide the overflow
            }

            <html>
            <head>
            <title>test</title>
            <link rel="stylesheet" type="text/css" href="style.css" />
            </head>
            <body>

            <nav class="navbar">
            <span class="brand"><a href="index.php">tensys</a></span>
            <ul class="nav-list">
            <li class="nav-link left"><a href="">Home</a></li>
            <li class="nav-link left"><a href="">Our Story</a></li>
            <li class="nav-link right"><a href="">Services</a></li>
            <li class="nav-link right"><a href="">Client Portal</a></li>
            </ul>
            </nav>

            <div class="hero-image">
            <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
            <div class="hero-text">
            <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
            </div>
            </div>
            </body>
            </html>





            A different approach (and perhaps better one) would be to fit the image to your page, by setting the image width equal to your page width - the height would be adjusted:






            img {
            width: 100%;
            }

            <html>
            <head>
            <title>test</title>
            <link rel="stylesheet" type="text/css" href="style.css" />
            </head>
            <body>

            <nav class="navbar">
            <span class="brand"><a href="index.php">tensys</a></span>
            <ul class="nav-list">
            <li class="nav-link left"><a href="">Home</a></li>
            <li class="nav-link left"><a href="">Our Story</a></li>
            <li class="nav-link right"><a href="">Services</a></li>
            <li class="nav-link right"><a href="">Client Portal</a></li>
            </ul>
            </nav>

            <div class="hero-image" style="overflow:hidden">
            <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
            <div class="hero-text">
            <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
            </div>
            </div>
            </body>
            </html>








            share|improve this answer






























              0














              Not sure what do you mean by overflow into the next section... you can set the overflow:hidden on hero-image class, to hide the overflown portion of the image:






              .hero-image {
              overflow:hidden; // <-- hide the overflow
              }

              <html>
              <head>
              <title>test</title>
              <link rel="stylesheet" type="text/css" href="style.css" />
              </head>
              <body>

              <nav class="navbar">
              <span class="brand"><a href="index.php">tensys</a></span>
              <ul class="nav-list">
              <li class="nav-link left"><a href="">Home</a></li>
              <li class="nav-link left"><a href="">Our Story</a></li>
              <li class="nav-link right"><a href="">Services</a></li>
              <li class="nav-link right"><a href="">Client Portal</a></li>
              </ul>
              </nav>

              <div class="hero-image">
              <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
              <div class="hero-text">
              <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
              </div>
              </div>
              </body>
              </html>





              A different approach (and perhaps better one) would be to fit the image to your page, by setting the image width equal to your page width - the height would be adjusted:






              img {
              width: 100%;
              }

              <html>
              <head>
              <title>test</title>
              <link rel="stylesheet" type="text/css" href="style.css" />
              </head>
              <body>

              <nav class="navbar">
              <span class="brand"><a href="index.php">tensys</a></span>
              <ul class="nav-list">
              <li class="nav-link left"><a href="">Home</a></li>
              <li class="nav-link left"><a href="">Our Story</a></li>
              <li class="nav-link right"><a href="">Services</a></li>
              <li class="nav-link right"><a href="">Client Portal</a></li>
              </ul>
              </nav>

              <div class="hero-image" style="overflow:hidden">
              <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
              <div class="hero-text">
              <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
              </div>
              </div>
              </body>
              </html>








              share|improve this answer




























                0












                0








                0







                Not sure what do you mean by overflow into the next section... you can set the overflow:hidden on hero-image class, to hide the overflown portion of the image:






                .hero-image {
                overflow:hidden; // <-- hide the overflow
                }

                <html>
                <head>
                <title>test</title>
                <link rel="stylesheet" type="text/css" href="style.css" />
                </head>
                <body>

                <nav class="navbar">
                <span class="brand"><a href="index.php">tensys</a></span>
                <ul class="nav-list">
                <li class="nav-link left"><a href="">Home</a></li>
                <li class="nav-link left"><a href="">Our Story</a></li>
                <li class="nav-link right"><a href="">Services</a></li>
                <li class="nav-link right"><a href="">Client Portal</a></li>
                </ul>
                </nav>

                <div class="hero-image">
                <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
                <div class="hero-text">
                <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
                </div>
                </div>
                </body>
                </html>





                A different approach (and perhaps better one) would be to fit the image to your page, by setting the image width equal to your page width - the height would be adjusted:






                img {
                width: 100%;
                }

                <html>
                <head>
                <title>test</title>
                <link rel="stylesheet" type="text/css" href="style.css" />
                </head>
                <body>

                <nav class="navbar">
                <span class="brand"><a href="index.php">tensys</a></span>
                <ul class="nav-list">
                <li class="nav-link left"><a href="">Home</a></li>
                <li class="nav-link left"><a href="">Our Story</a></li>
                <li class="nav-link right"><a href="">Services</a></li>
                <li class="nav-link right"><a href="">Client Portal</a></li>
                </ul>
                </nav>

                <div class="hero-image" style="overflow:hidden">
                <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
                <div class="hero-text">
                <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
                </div>
                </div>
                </body>
                </html>








                share|improve this answer















                Not sure what do you mean by overflow into the next section... you can set the overflow:hidden on hero-image class, to hide the overflown portion of the image:






                .hero-image {
                overflow:hidden; // <-- hide the overflow
                }

                <html>
                <head>
                <title>test</title>
                <link rel="stylesheet" type="text/css" href="style.css" />
                </head>
                <body>

                <nav class="navbar">
                <span class="brand"><a href="index.php">tensys</a></span>
                <ul class="nav-list">
                <li class="nav-link left"><a href="">Home</a></li>
                <li class="nav-link left"><a href="">Our Story</a></li>
                <li class="nav-link right"><a href="">Services</a></li>
                <li class="nav-link right"><a href="">Client Portal</a></li>
                </ul>
                </nav>

                <div class="hero-image">
                <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
                <div class="hero-text">
                <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
                </div>
                </div>
                </body>
                </html>





                A different approach (and perhaps better one) would be to fit the image to your page, by setting the image width equal to your page width - the height would be adjusted:






                img {
                width: 100%;
                }

                <html>
                <head>
                <title>test</title>
                <link rel="stylesheet" type="text/css" href="style.css" />
                </head>
                <body>

                <nav class="navbar">
                <span class="brand"><a href="index.php">tensys</a></span>
                <ul class="nav-list">
                <li class="nav-link left"><a href="">Home</a></li>
                <li class="nav-link left"><a href="">Our Story</a></li>
                <li class="nav-link right"><a href="">Services</a></li>
                <li class="nav-link right"><a href="">Client Portal</a></li>
                </ul>
                </nav>

                <div class="hero-image" style="overflow:hidden">
                <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
                <div class="hero-text">
                <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
                </div>
                </div>
                </body>
                </html>








                .hero-image {
                overflow:hidden; // <-- hide the overflow
                }

                <html>
                <head>
                <title>test</title>
                <link rel="stylesheet" type="text/css" href="style.css" />
                </head>
                <body>

                <nav class="navbar">
                <span class="brand"><a href="index.php">tensys</a></span>
                <ul class="nav-list">
                <li class="nav-link left"><a href="">Home</a></li>
                <li class="nav-link left"><a href="">Our Story</a></li>
                <li class="nav-link right"><a href="">Services</a></li>
                <li class="nav-link right"><a href="">Client Portal</a></li>
                </ul>
                </nav>

                <div class="hero-image">
                <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
                <div class="hero-text">
                <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
                </div>
                </div>
                </body>
                </html>





                .hero-image {
                overflow:hidden; // <-- hide the overflow
                }

                <html>
                <head>
                <title>test</title>
                <link rel="stylesheet" type="text/css" href="style.css" />
                </head>
                <body>

                <nav class="navbar">
                <span class="brand"><a href="index.php">tensys</a></span>
                <ul class="nav-list">
                <li class="nav-link left"><a href="">Home</a></li>
                <li class="nav-link left"><a href="">Our Story</a></li>
                <li class="nav-link right"><a href="">Services</a></li>
                <li class="nav-link right"><a href="">Client Portal</a></li>
                </ul>
                </nav>

                <div class="hero-image">
                <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
                <div class="hero-text">
                <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
                </div>
                </div>
                </body>
                </html>





                img {
                width: 100%;
                }

                <html>
                <head>
                <title>test</title>
                <link rel="stylesheet" type="text/css" href="style.css" />
                </head>
                <body>

                <nav class="navbar">
                <span class="brand"><a href="index.php">tensys</a></span>
                <ul class="nav-list">
                <li class="nav-link left"><a href="">Home</a></li>
                <li class="nav-link left"><a href="">Our Story</a></li>
                <li class="nav-link right"><a href="">Services</a></li>
                <li class="nav-link right"><a href="">Client Portal</a></li>
                </ul>
                </nav>

                <div class="hero-image" style="overflow:hidden">
                <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
                <div class="hero-text">
                <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
                </div>
                </div>
                </body>
                </html>





                img {
                width: 100%;
                }

                <html>
                <head>
                <title>test</title>
                <link rel="stylesheet" type="text/css" href="style.css" />
                </head>
                <body>

                <nav class="navbar">
                <span class="brand"><a href="index.php">tensys</a></span>
                <ul class="nav-list">
                <li class="nav-link left"><a href="">Home</a></li>
                <li class="nav-link left"><a href="">Our Story</a></li>
                <li class="nav-link right"><a href="">Services</a></li>
                <li class="nav-link right"><a href="">Client Portal</a></li>
                </ul>
                </nav>

                <div class="hero-image" style="overflow:hidden">
                <img src="https://www.communityled.org/wp-content/uploads/2017/09/community-hero.png" alt="bg-hero" />
                <div class="hero-text">
                <h1>Tennant management, <span class="emphasize">innovated.</span></h1>
                </div>
                </div>
                </body>
                </html>






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 14 '18 at 4:13

























                answered Nov 14 '18 at 2:08









                Hooman BahreiniHooman Bahreini

                3,3813731




                3,3813731






























                    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%2f53292125%2fmake-image-overflow-the-hero-element-and-align-to-the-bottom-right%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

                    Xamarin.iOS Cant Deploy on Iphone

                    Glorious Revolution

                    Dulmage-Mendelsohn matrix decomposition in Python