Styling different width columns in same row Bootstrap - html

I've just got back in to learning bootstrap, html and css. So far I have three cards in a row of different widths using the bootstrap grid the horizontal card template. My problem is that I want my layout to be the same in each card, The title and paragraph should be the same distance away in each and the fav / info button the same distance from the title. Also, I managed to get the first two columns close but somehow there is weird extra large spacing between the image and title of the last and largest column. How can I do this?
I've tried to manually adjust the positions of the elements in each card but it's hard to get them consistent, it also made my code a mess with extra ids for very similar things. As for the odd spacing I've tried to find the issue using developer tools on chrome to change the width, padding etc but not sure what is causing this. The columns I have are col-md-3, col-md-4 and col-md-5.
these are my cards
<div class="row">
<div class="col-md-3">
<div class="card mb-3">
<div class="row no-gutters">
<div class="col-md-4">
<div class="img-container"><img src="https://cdn.myanimelist.net/images/anime/1517/100633l.jpg" class="card-img-top" class="card-img" alt="..."></div>
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title">Attack on Titan</h5>
<p class="card-text">Airs Sunday :: 10 eps</p>"
<div class="col-md-4">
<div class="card mb-3">
<div class="row no-gutters">
<div class="col-md-3">
<div class="img-container"><img src="https://cdn.myanimelist.net/images/anime/1068/97169l.jpg" class="card-img-top" class="card-img" alt="..."></div>
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title">The Rising of the Shield Hero</h5>
<p class="card-text">Airs Wednesday :: 26 eps</p>
<div class="status"></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-5">
<div class="card mb-3">
<div class="row no-gutters">
<div class="col-md-3">
<div class="img-container"><img src="https://cdn.myanimelist.net/images/anime/1130/99458l.jpg" class="card-img-top" class="card-img-top" class="card-img" alt="..."></div>
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title">Hitori Bocchi no Maru Maru Seikatsu</h5>
<p class="card-text">Airs Saturday :: 12 eps</p>
<div class="status"></div>
</div>
</div>
</div>
I also added it to my codepen to better see also https://codepen.io/Shiro01/pen/YbRQmQ
I'm trying to get them similar to the cards on this site https://anichart.net/airing
I want to have the column fit the content and don't want the title breaking on to another line. I want the distance of the elements to be as equally spaced as possible so the whole design looks consistent. Thank you.

remove that class=" no-gutters" , and add class="container-fluid" before row
not try to edit boostrap class it destroy its responsive structure
And your stutus bar can adjust with position absolute or change your style
status {
background-color: #662481;
height: 76px;
width: 10px;
position: relative;
left: 187px;
top: -103px;
margin: 0;
padding: 0;code here

<div class="row outer_row">
<div class="col-md-4">
<div class="row inside_row">
<div class="col-sm-4">
<div class="img-container">
<img src="https://cdn.myanimelist.net/images/anime/1517/100633l.jpg" class="card-img-top" alt="..."></div>
</div>
<div class="col-sm-6">
<div class="card-data">
<h5 class="card-title">Attack on Titan</h5>
<p class="card-text">Airs Sunday :: 10 eps</p>
</div>
</div>
<div class="col-sm-2">
<div class="status"></div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="row inside_row">
<div class="col-sm-4">
<div class="img-container">
<img src="https://cdn.myanimelist.net/images/anime/1517/100633l.jpg" class="card-img-top" class="card-img" alt="..."></div>
</div>
<div class="col-sm-6">
<div class="card-data">
<h5 class="card-title">Attack on Titan</h5>
<p class="card-text">Airs Sunday :: 10 eps</p>
</div>
</div>
<div class="col-sm-2">
<div class="status"></div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="row inside_row">
<div class="col-sm-4">
<div class="img-container">
<img src="https://cdn.myanimelist.net/images/anime/1517/100633l.jpg" class="card-img-top" class="card-img" alt="..."></div>
</div>
<div class="col-sm-6">
<div class="card-data">
<h5 class="card-title">Attack on Titan</h5>
<p class="card-text">Airs Sunday :: 10 eps</p>
</div>
</div>
<div class="col-sm-2">
<div class="status"></div>
</div>
</div>
</div>
here is css for HTML code :
body {
padding: 70px;
}
.card-img-top {
width: 100%;
margin-left: -15px;
height: 80px;
}
.status {
background-color: #662481;
height: 80px;
width: 10px;
}
.card-data{
margin-left:-30px;
margin-top:6px;
}
.inside_row{
width: 100%;
border:1px solid lightgray;
height:80px;
}
.outer_row{
width: 100%;
}
here is my solution for your question in a codepen https://codepen.io/nick4434/pen/joQGVM?editors=1100

please try this code:
body {
padding: 70px;
font-family: arial, helvetica;
background-color: #ebebeb;
}
.navbar {
background-color: #fff;
}
.navbar-brand {
color: #2980b9; /* Clips image */
font-size: 20px;
font-weight: bold;
}
.nav-link {
color: #2980b9;
}
.mb-3 {
max-height: 100px;
}
.md-3 {
max-width: auto;
}
.card-title {
font-size: 16px;
font-weight: bold;
margin-top: -10px;
margin-bottom: 2px;
margin-left: -10px;
}
.card-text {
margin-top: -4px;
margin-bottom: 40px;
margin-left: -10px;
font-size: 12px;
}
/* Clips image */
.img-container {
display: inline-block;
width: 100px;
height: 100px;
overflow: hidden;
}
.card-img-top {
position: relative; top: 50%;
transform: translateY(-35%);
}
.status {
background-color: #662481;
height: 100px;
width: 10px;
position: relative;
top: -96px;
margin-left: auto;
z-index: 99;
padding: 0;
right: -20px;
}
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport"content="width=device-width, initial scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="assets/font/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="index-css-mini.css">
<title>AniWatch</title>
</head>
<body>
<div class="container">
<nav class="navbar navbar-expand-md fixed-top">
Brand
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<div class="navbar-nav">
Airing
Finished
</div>
</div>
</nav>
</div> <!-- nav container -->
<div class="row">
<div class="col-md-3">
<div class="card mb-3">
<div class="row no-gutters">
<div class="col-md-4">
<div class="img-container"><img src="https://cdn.myanimelist.net/images/anime/1517/100633l.jpg" class="card-img-top" class="card-img" alt="..."></div>
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title">Attack on Titan</h5>
<p class="card-text">Airs Sunday :: 10 eps</p>
<div class="status"></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mb-3">
<div class="row no-gutters">
<div class="col-md-3">
<div class="img-container"><img src="https://cdn.myanimelist.net/images/anime/1068/97169l.jpg" class="card-img-top" class="card-img" alt="..."></div>
</div>
<div class="col-md-9">
<div class="card-body">
<h5 class="card-title">The Rising of the Shield Hero</h5>
<p class="card-text">Airs Wednesday :: 26 eps</p>
<div class="status"></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-5">
<div class="card mb-3">
<div class="row no-gutters">
<div class="col-md-3">
<div class="img-container"><img src="https://cdn.myanimelist.net/images/anime/1130/99458l.jpg" class="card-img-top" class="card-img-top" class="card-img" alt="..."></div>
</div>
<div class="col-md-9">
<div class="card-body">
<h5 class="card-title">Hitori Bocchi no Maru Maru Seikatsu</h5>
<p class="card-text">Airs Saturday :: 12 eps</p>
<div class="status"></div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>

Related

Put a div next to an image not under

I am using Bootstrap and I have an image, and I want to have the card on the right of the image, but it is at the bottom.
I tried using display: inline-block, but that did not work. I looked at the other answers on the site and they did not work for me either, so please don't recommend those.
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<h1 style="text-align: center; font-size: 70px; ">Crabapple Lake Parc</h1>
<img src="https://th.bing.com/th/id/R.bb60507b5a1f567e6b6592f375bf5e8d?rik=FgkA6Taf%2fHwJsA&pid=ImgRaw&r=0" alt="Group Picture" style="display: block; margin-left: auto; margin-right: auto; width: 50%;">
<div class="card" style="width: 18rem;">
<div class="card-body">
<h5 class="card-title">Have Questions?</h5>
FAQ
Contact Us
</div>
</div>
To have a card next to the image using Bootstrap, you can use the grid system. In the code below, the col-md-4 class is used to specify that the image will take up four columns out of a possible twelve, and the col-md-8 class is used to specify that the card will take up the remaining eight columns. If you find that the card is appearing below the image, it may be because the image is too wide for the column. To fix this, you can add the img-fluid class to the image to ensure that it is responsive and will fit within the column.
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<h1 style="text-align: center; font-size: 70px; ">Crabapple Lake Parc</h1>
<div class="container">
<div class="row">
<div class="col-md-4">
<img src="https://th.bing.com/th/id/R.bb60507b5a1f567e6b6592f375bf5e8d?rik=FgkA6Taf%2fHwJsA&pid=ImgRaw&r=0" class="img-fluid" alt="Group Picture">
</div>
<div class="col-md-8">
<div class="card">
<div class="card-body">
<h5 class="card-title">Have Questions?</h5>
FAQ
Contact Us
</div>
</div>
</div>
</div>
</div>
<h1 style="text-align: center; font-size: 70px;">Crabapple Lake Parc</h1>
<div class="row">
<div class="col-md-6">
<img src="https://th.bing.com/th/id/R.bb60507b5a1f567e6b6592f375bf5e8d?rik=FgkA6Taf%2fHwJsA&pid=ImgRaw&r=0" alt="Group Picture" style="display: block; margin-left: auto; margin-right: auto; width: 100%;">
</div>
<div class="col-md-6">
<div class="card" style="width: 18rem;">
<div class="card-body">
<h5 class="card-title">Have Questions?</h5>
FAQ
Contact Us
</div>
</div>
</div>
</div>
In your parent element you can use these styles
display: flex;
justify-content: space-between;
Or in Bootstrap: d-flex and justify-content-between classes:
<div class="d-flex justify-content-between">
<h1 style="text-align: center; font-size: 70px; ">Crabapple Lake Parc</h1>
<img src="https://th.bing.com/th/id/R.bb60507b5a1f567e6b6592f375bf5e8d?rik=FgkA6Taf%2fHwJsA&pid=ImgRaw&r=0" alt="Group Picture" style="display: block; margin-left: auto; margin-right: auto; width: 50%;">
<div class="card" style="width: 18rem;">
<div class="card-body">
<h5 class="card-title">Have Questions?</h5>
FAQ
Contact Us
</div>
</div>
</div>
WITH TITLE IN THE TOP:
<h1 style="text-align: center; font-size: 70px; ">Crabapple Lake Parc</h1>
<div class="d-flex justify-content-between">
<img src="https://th.bing.com/th/id/R.bb60507b5a1f567e6b6592f375bf5e8d?rik=FgkA6Taf%2fHwJsA&pid=ImgRaw&r=0" alt="Group Picture" style="display: block; margin-left: auto; margin-right: auto; width: 50%;">
<div class="card" style="width: 18rem;">
<div class="card-body">
<h5 class="card-title">Have Questions?</h5>
FAQ
Contact Us
</div>
</div>
</div>
You could* use .d-inline-block if it is appropriate for your layout. You need to use it on both the img and the .card.
*I'm not necessarily recommending this, but it does what you ask.
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<h1 style="text-align: center; font-size: 70px; ">Crabapple Lake Parc</h1>
<img class="d-inline-block w-50" src="https://th.bing.com/th/id/R.bb60507b5a1f567e6b6592f375bf5e8d?rik=FgkA6Taf%2fHwJsA&pid=ImgRaw&r=0" alt="Group Picture">
<div class="card d-inline-block" style="width: 18rem;">
<div class="card-body">
<h5 class="card-title">Have Questions?</h5>
FAQ
Contact Us
</div>
</div>

Bootstrap columns not appearing on smaller screens

I developed a grid with 3 columns. My problem is that the columns shrink too much and do not present the content correctly when they are adjusted in smaller sizes.
Is there a way to implement a break-point, so that when the screen measurement of approximately 1000px arrives, pass all the content to a single column?
The other problem arises when I reach the mobile size, the last two columns (highlighted in the image) disappear. These should appear under the first column
How can I solve my problem and what did I do wrong?
DEMO
Code
<div class="container-fluid"
style="overflow-x:hidden;padding-left:0;display:flex; height: 98vh; margin-right:0px; margin-left:0px">
<div class="col-md-6 col-sm-12 customcol">
<div class="card card1">
<div class="card-body">
<p class="card-text">1asdas</p>
</div>
</div>
<div class="divh" style="justify-content: flex-start; display: flex">
<div class="card card2">
<div class="card-body">
<p class="card-text">2aasasddsd</p>
</div>
</div>
<div class="card card2">
<div class="card-body">
<p class="card-text">3asd</p>
</div>
</div>
</div>
<div class="divh" style="justify-content: flex-start; display: flex">
<div class="card card2">
<div class="card-body">
<p class="card-text">4asdasd</p>
</div>
</div>
<div class="card card2">
<div class="card-body">
<p class="card-text">5asda</p>
</div>
</div>
</div>
<div class="divh" style="justify-content: flex-start; display: flex">
<div class="card card4" style="height:100%">
<div class="card-body">
<p class="card-text">6asda</p>
</div>
</div>
<div class="card card4" style="height:100%">
<div class="card-body">
<p class="card-text">7asd</p>
</div>
</div>
<div class="card card4" style="height:100%">
<div class="card-body">
<p class="card-text">8asdasd</p>
</div>
</div>
<div class="card card4" style="height:100%">
<div class="card-body">
<p class="card-text">9asdsad</p>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12 customcol">
<div class="card card1">
<div class="card-body">
<p class="card-text">10asd</p>
</div>
</div>
<div class="card card1">
<div class="card-body">
<p class="card-text">11asdas</p>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12 customcol">
<div class="card cardall">
<div class="card-body">
<p class="card-text">12asd</p>
</div>
</div>
</div>
</div>
Problem
The issue is you are using col without row.
When ever you need to use column there must be some row as its parent its define in official doc of Bootstrap
.card{
margin-top: 16px;
margin-left: 16px;
}
.card-body{
padding:4px;
}
.card1{
height: calc(50% - 16px)
}
.divh{
height: calc(16.7% - 16px);
margin-top: 16px;
}
.card2{
width: calc(50% - 16px);
margin-top:0px;
height:100%;
}
.card4{
width: calc(25% - 16px);
margin-top:0px;
height:100%;
}
.cardall{
height: calc(100% - 16px)
}
.customcol{
padding-left: 0;
padding-right: 0;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="container-fluid" style="padding-left:0; height: 98vh;">
<div class="row">
<div class="col-md-4 col-sm-12 customcol">
<div class="card card1">
<div class="card-body">
<p class="card-text">1asdas</p>
</div>
</div>
<div class="divh" style="justify-content: flex-start; display: flex">
<div class="card card2" >
<div class="card-body">
<p class="card-text">2aasasddsd</p>
</div>
</div>
<div class="card card2">
<div class="card-body">
<p class="card-text">3asd</p>
</div>
</div>
</div>
<div class="divh" style="justify-content: flex-start; display: flex">
<div class="card card2">
<div class="card-body">
<p class="card-text">4asdasd</p>
</div>
</div>
<div class="card card2">
<div class="card-body">
<p class="card-text">5asda</p>
</div>
</div>
</div>
<div class="divh" style="justify-content: flex-start; display: flex">
<div class="card card4" style="height:100%">
<div class="card-body">
<p class="card-text">6asda</p>
</div>
</div>
<div class="card card4" style="height:100%">
<div class="card-body">
<p class="card-text">7asd</p>
</div>
</div>
<div class="card card4" style="height:100%">
<div class="card-body">
<p class="card-text">8asdasd</p>
</div>
</div>
<div class="card card4" style="height:100%">
<div class="card-body">
<p class="card-text">9asdsad</p>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-12 customcol">
<div class="card card1">
<div class="card-body">
<p class="card-text">10asd</p>
</div>
</div>
<div class="card card1">
<div class="card-body">
<p class="card-text">11asdas</p>
</div>
</div>
</div>
<div class="col-md-4 col-sm-12 customcol">
<div class="card cardall">
<div class="card-body">
<p class="card-text">12asd</p>
</div>
</div>
</div>
</div>
</div>
.card{
margin-top: 16px;
margin-left: 16px;
}
.card-body{
padding:4px;
}
.card1{
height: calc(50% - 16px)
}
.divh{
height: calc(16.7% - 16px);
margin-top: 16px;
}
.card2{
width: calc(50% - 16px);
margin-top:0px;
height:100%;
}
.card4{
width: calc(25% - 16px);
margin-top:0px;
height:100%;
}
.cardall{
height: calc(100% - 16px)
}
.customcol{
padding-left: 0;
padding-right: 0;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="container-fluid" style="padding-left:0; height: 98vh;">
<div class="row">
<div class="col-md-4 col-sm-12 customcol">
<div class="card card1">
<div class="card-body">
<p class="card-text">1asdas</p>
</div>
</div>
<div class="divh" style="justify-content: flex-start; display: flex">
<div class="card card2" >
<div class="card-body">
<p class="card-text">2aasasddsd</p>
</div>
</div>
<div class="card card2">
<div class="card-body">
<p class="card-text">3asd</p>
</div>
</div>
</div>
<div class="divh" style="justify-content: flex-start; display: flex">
<div class="card card2">
<div class="card-body">
<p class="card-text">4asdasd</p>
</div>
</div>
<div class="card card2">
<div class="card-body">
<p class="card-text">5asda</p>
</div>
</div>
</div>
<div class="divh" style="justify-content: flex-start; display: flex">
<div class="card card4" style="height:100%">
<div class="card-body">
<p class="card-text">6asda</p>
</div>
</div>
<div class="card card4" style="height:100%">
<div class="card-body">
<p class="card-text">7asd</p>
</div>
</div>
<div class="card card4" style="height:100%">
<div class="card-body">
<p class="card-text">8asdasd</p>
</div>
</div>
<div class="card card4" style="height:100%">
<div class="card-body">
<p class="card-text">9asdsad</p>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-12 customcol">
<div class="card card1">
<div class="card-body">
<p class="card-text">10asd</p>
</div>
</div>
<div class="card card1">
<div class="card-body">
<p class="card-text">11asdas</p>
</div>
</div>
</div>
<div class="col-md-4 col-sm-12 customcol">
<div class="card cardall">
<div class="card-body">
<p class="card-text">12asd</p>
</div>
</div>
</div>
</div>
</div>

How to get desired html layout in small screens which is differ in large screens

I implemented markup code and got desired layout in large screens, but on reducing size of screen to the phone level I need layout like image-3 and in big screen like laptops it should be like image-1. Image-1,Image-3 refer to single image that i have linked.
I am using Bootstrap-4, html-5
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" />
<div class="container-fluid">
<h6>Image-1 in large screens like laptop</h6>
<div class="row">
<div class="col-sm-8 ">
<div class=" card">
<button class="bg-danger" style="padding: 15%; font-size: 15px">bigone</button>
</div>
</div>
<div class="col-sm-4">
<div class="card"><button class="bg-danger" style="padding: 10%; font-size: 15px">oneSmall</button></div>
<div class="card"><button class="bg-danger" style="padding: 10%; font-size: 15px">oneSmall</button></div>
</div>
</div>
</div>
<!-- In order to fulfil desired layoutin small screens, i implemented this-->
<div class="container-fluid">
<h6>Image-2 after i made changes to get layout like Image-3,but in large screen it looks</h6>
<div class="row">
<div class="col-sm-8 col-12 ">
<div class=" card">
<button class="bg-dark" style="padding: 15%; font-size: 15px">bigone</button>
</div>
</div>
<div class="col-sm-4">
<div class="row">
<div class="card col-6"><button class="bg-dark" style="padding: 10%; font-size: 15px">oneSmall</button></div>
<div class="card col-6"><button class="bg-dark" style="padding: 10%; font-size: 15px">oneSmall</button></div>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<h6>Image-3, like this i need to get in phone's screen, or smaller devices</h6>
<div class="row">
<div class="col-12">
<div class=" card">
<button class="bg-danger" style="padding: 15%; font-size: 15px">bigone</button>
</div>
</div>
<div class="card col-6"><button class="bg-danger" style="padding-right: 50%; padding-bottom: 10%; font-size: 15px; width: 100%">oneSmall</button></div>
<div class="card col-6"><button class="bg-danger" style="padding-left: 50%; padding-bottom: 10%;font-size: 15px; width: 100%">oneSmall</button></div>
</div>
</div>
Image that describes layout
Use the responsive grid classes to change the layout at the desired breakpoints.
For example, col-12 col-md-8 means 8 columns wide on md and larger, and 12 columns wide on md and smaller:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" />
<div class="container-fluid">
<div class="row">
<div class="col-12 col-md-8">
<div class=" card">
<button class="bg-danger" style="padding: 15%; font-size: 15px">bigone</button>
</div>
</div>
<div class="col-12 col-md-4">
<div class="row h-100">
<div class="col-6 col-md-12">
<div class="card h-100">
<button class="bg-danger h-100" style="padding-right: 50%; padding-bottom: 10%; font-size: 15px; width: 100%">oneSmall</button>
</div>
</div>
<div class="col-6 col-md-12">
<div class="card h-100">
<button class="bg-danger h-100" style="padding-right: 50%; padding-bottom: 10%; font-size: 15px; width: 100%">oneSmall</button>
</div>
</div>
</div>
</div>
</div>
</div>
https://www.codeply.com/go/eTGcVjgAWH
Try with this code. Hope can help you.
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" />
<div class="container-fluid">
<div class="row">
<div class="col-lg-8 col-sm-12">
<div class="card">
<button class="bg-danger" style="padding: 15%; font-size: 15px">bigone</button>
</div>
</div>
<div class="col-lg-4 col-sm-12">
<div class="row">
<div class="col-md-12 col-sm-6">
<div class="card"><button class="bg-dark" style="padding: 10%; font-size: 15px">oneSmall</button></div>
</div>
<div class="col-md-12 col-sm-6">
<div class="card"><button class="bg-dark" style="padding: 10%; font-size: 15px">oneSmall</button></div>
</div>
</div>
</div>
</div>
</div>

How can i fix it? Card out of DIV

I'm trying to list side by side an anime list with images and name on a card, but the DIV ends and the image ignores and continues, how can I solve this?
URL: Here
Image: The image
css:
.card {
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
transition: 0.3s;
min-width: 199px;
max-width: 200px;
float:left;
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-left:5px;
margin-top:10px;
}
HTML:
<div class="container">
<div class="card">
<button class="btn btn-success add" onclick="novoEpisodio(85)"><span class="fa fa-plus"></span> Adicionar Episódio</button>
<img onclick="escolherAnime(85)" src="https://4.bp.blogspot.com/-TYMOypUwSGI/WcqOASxepZI/AAAAAAAAK2w/-_V0RHPcEj8d0IO79AyUf2oUFTRRa3TjgCLcBGAs/s1600/Black-Clover-anime-poster-visual-v1.jpg" style="min-width:199px; max-width:200px; min-height:299px; max-height: 300px;">
<div class="container">
<h4><b>Black Clover</b>
</h4>
</div>
</div>
First of all, you're site's Bootstrap version is out of date with the HTML syntax you're using. Cards replaced panels from Bootstrap 3. You're using Bootstrap 3, view here which uses panels.
A lot of things changed between Bootstrap 3 and 4. I highly recommend you go with Bootstrap 4. Additionally, your HTML syntax doesn't line up with the traditional layout.
container > row > column > card
Here is a Codepen you can fork and play with.
Here is an example of what you need using Bootstrap 4.
/* Roboto Font */
#import url('https://fonts.googleapis.com/css?family=Roboto');
html, body {
height: 100%;
}
body {
font-family: 'Roboto', sans-serif;
}
/* Custom CSS */
.text-strong {
font-weight: bold;
}
.card-body {
padding: .5rem;
}
.card-title {
margin: 0;
}
.card {
border: 2px dashed black;
box-shadow: 0px 10px 20px rgba(150,150,150,.5);
}
.card:hover {
box-shadow: 0px 10px 20px rgba(60, 141, 188,0.5);
}
<link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css'>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js'></script>
<script src='https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.bundle.min.js'></script>
<div class="container-fluid p-5">
<div class="row no-gutters">
<div class="col-sm-12 col-md-3 col-lg-2 d-flex align-items-stretch mb-2">
<div class="card">
<img class="card-img-top" src="https://www.anitube.site/wp-content/uploads/Bleach-dub.jpg">
<div class="card-body">
<h5 class="card-title text-strong">Bleach</h5>
</div>
</div>
</div>
<div class="col-sm-12 col-md-3 col-lg-2 d-flex align-items-stretch mb-2">
<div class="card">
<img class="card-img-top" src="https://www.anitube.site/wp-content/uploads/Bleach-dub.jpg">
<div class="card-body">
<h5 class="card-title text-strong">Black Clover</h5>
</div>
</div>
</div>
<div class="col-sm-12 col-md-3 col-lg-2 d-flex align-items-stretch mb-2">
<div class="card">
<img class="card-img-top" src="https://www.anitube.site/wp-content/uploads/Bleach-dub.jpg">
<div class="card-body">
<h5 class="card-title text-strong">Boku dake ga in...</h5>
</div>
</div>
</div>
<div class="col-sm-12 col-md-3 col-lg-2 d-flex align-items-stretch mb-2">
<div class="card">
<img class="card-img-top" src="https://www.anitube.site/wp-content/uploads/Bleach-dub.jpg">
<div class="card-body">
<h5 class="card-title text-strong">Dragon Ball Super</h5>
</div>
</div>
</div>
<div class="col-sm-12 col-md-3 col-lg-2 d-flex align-items-stretch mb-2">
<div class="card">
<img class="card-img-top" src="https://www.anitube.site/wp-content/uploads/Bleach-dub.jpg">
<div class="card-body">
<h5 class="card-title text-strong">Nanatsu no Taizai</h5>
</div>
</div>
</div>
<div class="col-sm-12 col-md-3 col-lg-2 d-flex align-items-stretch mb-2">
<div class="card">
<img class="card-img-top" src="https://www.anitube.site/wp-content/uploads/Bleach-dub.jpg">
<div class="card-body">
<h5 class="card-title text-strong">Naruto Shippuden</h5>
</div>
</div>
</div>
</div>
</div>

Bootstrap responsive panel with thumbnails and custom content, not exactly responding as expected

So I'm in a coding Boot camp, been coding for a little over 1.5 months. For one of my assignments, I was to create a mobile responsive portfolio using Bootstrap. The directions clearly stated not to use media queries, as the queries are under the hood on of my TAs told me. Inasmuch as I'm not allowed to implement explicit use of queries, I seem to be stumped. I already turned the assignment is, but dont want to skim ovedr the solution - if there is one. Here is my html:
<div class="container" id="page">
<div class="row">
<div class="col-md-8 col-xs-12">
<div class="container-fluid">
<div class="panel" id="main-section">
<div class="panel-heading">
<h4 id="headings">Portfolio</h4>
<div class="row" id="box-search">
<div class="col-md-6 col-xs-12">
<div class="thumbnail text-center">
<img src="hangman.jpg" class="image-responsive" id="images-left">
<div class="caption">
<p style="background-color: #2c3e50; color: #ffffff" id="text-box">Hangman</p>
</div>
</div>
</div>
<div class="col-md-6 col-xs-12">
<div class="thumbnail text-center">
<img src="rpg.jpg" class="image-responsive" id="images-right">
<div class="caption">
<p style="background-color: #2c3e50; color: #ffffff">Role Player Game</p>
</div>
</div>
</div>
</div>
<div class="row" id="box-search">
<div class="col-md-6 col-xs-12">
<div class="thumbnail text-center">
<img src="trivia.jpg" class="image-responsive" id="images-left">
<div class="caption">
<p style="background-color: #2c3e50; color: #ffffff"`enter code here`>Trivia</p>
</div>
</div>
</div>
<div class="col-md-6 col-xs-12">
<div class="thumbnail text-center">
<img src="rutgers.jpg" class="image-responsive" id="images-right">
<div class="caption">
<p style="background-color: #2c3e50; color: #ffffff" id="text-box">Rutgers Info Widget</p>
</div>
</div>
</div>
</div>
<div class="row" id="box-search">
<div class="col-md-6 col-xs-12">
<div class="thumbnail text-center">
<img src="rps.jpg " class="image-responsive " id="images-left">
<div class="caption">
<p style="background-color: #2c3e50; color: #ffffff;" id="text-box">Rock Paper Scissors</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
and the css:
.thumbnail {
position: relative;
}
.caption {
position: absolute;
top: 75%;
left: 0px;
width: 190px;
text-align: center;
}
#images-left,
#images-right {
height: 190px;
width: 190px;
}
/*portfolio styling*/
#main-section-port {
min-width: 300px;
max-width: 640px;
float: left;
background-color: #ffffff;
margin-bottom: 80px;
}
and here is a link to the actual website if you'd like to see: afflatus480.github.io
Again, I already submitted the work, so no need to rush. But any help will be appreciated nonetheless. Thank you for your time.