My element overflows its div onto another when resizing screen. Why is this happening?How to affect other elements when a div is hoveredCan media queries resize based on a div element instead of the screen?Cannot display HTML stringAnchor tag text won't wrapabsolutely positioned div inside relatively positionsed div is not movingResponsive grid overlaying an image and text div onto another responsive imageWhy does margin-top on a div element inside body, show scroll bars on the page?Responsive Web Banner with Background Image and TextExplanation of CSS AND HTML positioningCSS - Stacked elements overflow each other on smaller screens

Why did Saturn V not head straight to the moon?

Is the 2-Category of groupoids locally presentable?

"I you already know": is this proper English?

Is the apartment I want to rent a scam?

Which creatures count as green creatures?

What is the purpose of this "red room" in Stranger Things?

Other than a swing wing, what types of variable geometry have flown?

Is an easily guessed plot twist a good plot twist?

USA: Can a witness take the 5th to avoid perjury?

401(k) investment after being fired. Do I own it?

Are glider winch launches rarer in the USA than in the rest of the world? Why?

The seven story archetypes. Are they truly all of them?

Why did modems have speakers?

Company requiring me to let them review research from before I was hired

Should I describe a character deeply before killing it?

High income, sudden windfall

Extrapolation v. Interpolation

Is Grandpa Irrational? Another Grandpa Mystery

Keeping an "hot eyeball planet" wet

Film where a boy turns into a princess

How can I make sure my players' decisions have consequences?

Book with a female main character living in a convent who has to fight gods

What would be the side effects on the life of a person becoming indestructible?

Impact of throwing away fruit waste on a peak > 3200 m above a glacier



My element overflows its div onto another when resizing screen. Why is this happening?


How to affect other elements when a div is hoveredCan media queries resize based on a div element instead of the screen?Cannot display HTML stringAnchor tag text won't wrapabsolutely positioned div inside relatively positionsed div is not movingResponsive grid overlaying an image and text div onto another responsive imageWhy does margin-top on a div element inside body, show scroll bars on the page?Responsive Web Banner with Background Image and TextExplanation of CSS AND HTML positioningCSS - Stacked elements overflow each other on smaller screens






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















When the site is in full screen, the layout is fine but when I resize the window to a smaller size, elements overflow onto other elements.



I tried wrapping the elements inside a main div but it still overflows



<div class="container" style="padding-top:25vh; display: block">
<!-- <h1 id="projects">Projects</h1> -->
<div class="row">
<div class="card col-lg-4 col-md-6 col-sm-12" style="width: 18rem;">
<div class="card-header bg-transparent">Project Name: </div>
<a href=""> <img class="card-img-top" src="https://images.unsplash.com/photo-1505238680356-667803448bb6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60" class="card-img-top" alt="..."></a>
<div class="card-body">
<p class="card-text">Description: </p>
<p class="card-text">Languages/Frameworks utilized: </p>
</div>
</div>



It should stay inside one div and not overflow out of it.










share|improve this question






















  • Post your css code

    – Ifaruki
    Mar 26 at 15:47











  • Hi and welcome to SO, please can you calrify which elements are overflowing onto other elements - when I paste the code given into bootply, everything seems fine right down to mobile resolution (which cannot be seen in bootply). Also please take the time to take a tour of the help centre to see how to ask a good question.

    – Pete
    Mar 26 at 15:51

















0















When the site is in full screen, the layout is fine but when I resize the window to a smaller size, elements overflow onto other elements.



I tried wrapping the elements inside a main div but it still overflows



<div class="container" style="padding-top:25vh; display: block">
<!-- <h1 id="projects">Projects</h1> -->
<div class="row">
<div class="card col-lg-4 col-md-6 col-sm-12" style="width: 18rem;">
<div class="card-header bg-transparent">Project Name: </div>
<a href=""> <img class="card-img-top" src="https://images.unsplash.com/photo-1505238680356-667803448bb6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60" class="card-img-top" alt="..."></a>
<div class="card-body">
<p class="card-text">Description: </p>
<p class="card-text">Languages/Frameworks utilized: </p>
</div>
</div>



It should stay inside one div and not overflow out of it.










share|improve this question






















  • Post your css code

    – Ifaruki
    Mar 26 at 15:47











  • Hi and welcome to SO, please can you calrify which elements are overflowing onto other elements - when I paste the code given into bootply, everything seems fine right down to mobile resolution (which cannot be seen in bootply). Also please take the time to take a tour of the help centre to see how to ask a good question.

    – Pete
    Mar 26 at 15:51













0












0








0








When the site is in full screen, the layout is fine but when I resize the window to a smaller size, elements overflow onto other elements.



I tried wrapping the elements inside a main div but it still overflows



<div class="container" style="padding-top:25vh; display: block">
<!-- <h1 id="projects">Projects</h1> -->
<div class="row">
<div class="card col-lg-4 col-md-6 col-sm-12" style="width: 18rem;">
<div class="card-header bg-transparent">Project Name: </div>
<a href=""> <img class="card-img-top" src="https://images.unsplash.com/photo-1505238680356-667803448bb6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60" class="card-img-top" alt="..."></a>
<div class="card-body">
<p class="card-text">Description: </p>
<p class="card-text">Languages/Frameworks utilized: </p>
</div>
</div>



It should stay inside one div and not overflow out of it.










share|improve this question














When the site is in full screen, the layout is fine but when I resize the window to a smaller size, elements overflow onto other elements.



I tried wrapping the elements inside a main div but it still overflows



<div class="container" style="padding-top:25vh; display: block">
<!-- <h1 id="projects">Projects</h1> -->
<div class="row">
<div class="card col-lg-4 col-md-6 col-sm-12" style="width: 18rem;">
<div class="card-header bg-transparent">Project Name: </div>
<a href=""> <img class="card-img-top" src="https://images.unsplash.com/photo-1505238680356-667803448bb6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60" class="card-img-top" alt="..."></a>
<div class="card-body">
<p class="card-text">Description: </p>
<p class="card-text">Languages/Frameworks utilized: </p>
</div>
</div>



It should stay inside one div and not overflow out of it.







html css overflow element






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 15:45









HarryNguyen927HarryNguyen927

11 bronze badge




11 bronze badge












  • Post your css code

    – Ifaruki
    Mar 26 at 15:47











  • Hi and welcome to SO, please can you calrify which elements are overflowing onto other elements - when I paste the code given into bootply, everything seems fine right down to mobile resolution (which cannot be seen in bootply). Also please take the time to take a tour of the help centre to see how to ask a good question.

    – Pete
    Mar 26 at 15:51

















  • Post your css code

    – Ifaruki
    Mar 26 at 15:47











  • Hi and welcome to SO, please can you calrify which elements are overflowing onto other elements - when I paste the code given into bootply, everything seems fine right down to mobile resolution (which cannot be seen in bootply). Also please take the time to take a tour of the help centre to see how to ask a good question.

    – Pete
    Mar 26 at 15:51
















Post your css code

– Ifaruki
Mar 26 at 15:47





Post your css code

– Ifaruki
Mar 26 at 15:47













Hi and welcome to SO, please can you calrify which elements are overflowing onto other elements - when I paste the code given into bootply, everything seems fine right down to mobile resolution (which cannot be seen in bootply). Also please take the time to take a tour of the help centre to see how to ask a good question.

– Pete
Mar 26 at 15:51





Hi and welcome to SO, please can you calrify which elements are overflowing onto other elements - when I paste the code given into bootply, everything seems fine right down to mobile resolution (which cannot be seen in bootply). Also please take the time to take a tour of the help centre to see how to ask a good question.

– Pete
Mar 26 at 15:51












1 Answer
1






active

oldest

votes


















0














This is probably because you are overriding card width here:



class="card col-lg-4 col-md-6 col-sm-12" style="width: 18rem;"



So your cards are not responsive anymore.






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%2f55361185%2fmy-element-overflows-its-div-onto-another-when-resizing-screen-why-is-this-happ%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














    This is probably because you are overriding card width here:



    class="card col-lg-4 col-md-6 col-sm-12" style="width: 18rem;"



    So your cards are not responsive anymore.






    share|improve this answer



























      0














      This is probably because you are overriding card width here:



      class="card col-lg-4 col-md-6 col-sm-12" style="width: 18rem;"



      So your cards are not responsive anymore.






      share|improve this answer

























        0












        0








        0







        This is probably because you are overriding card width here:



        class="card col-lg-4 col-md-6 col-sm-12" style="width: 18rem;"



        So your cards are not responsive anymore.






        share|improve this answer













        This is probably because you are overriding card width here:



        class="card col-lg-4 col-md-6 col-sm-12" style="width: 18rem;"



        So your cards are not responsive anymore.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 26 at 16:07









        laferrylaferry

        113 bronze badges




        113 bronze badges


















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            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%2f55361185%2fmy-element-overflows-its-div-onto-another-when-resizing-screen-why-is-this-happ%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

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript