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;
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
add a comment |
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
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
add a comment |
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
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
html css overflow element
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Mar 26 at 16:07
laferrylaferry
113 bronze badges
113 bronze badges
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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