Search
 
SCRIPT & CODE EXAMPLE
 

CSS

css horizontal scroll cards


.row{
  align-items: stretch;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}
.card {
  /*float: left;*/
  max-width: 33.333%;
  padding: .75rem;
  margin-bottom: 2rem;
  border: 0;
  flex-basis: 33.333%;
  flex-grow: 0;
  flex-shrink: 0;
}

.card > img {
  margin-bottom: .75rem;
  width: 100%;
}

.card-text {
  font-size: 85%;
}

<div class="container">
  <div class="row">
    <div class="card">
      <img src="https://picsum.photos/300/200">
      <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
    </div>
    <div class="card">
      <img src="https://picsum.photos/300/200">
      <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
    </div>
     <div class="card">
      <img src="https://picsum.photos/300/200">
      <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
    </div>
     <div class="card">
      <img src="https://picsum.photos/300/200">
      <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
    </div>
  </div>
</div>
Comment

PREVIOUS NEXT
Code Example
Css :: disabled button tailwind css class on basis of true false 
Css :: add inner border css 
Css :: chenge number of lines of text in css 
Css :: width defined by content css 
Css :: css window height 
Css :: vue import css scoped 
Css :: center ul 
Css :: css get the image to the center and to make it relative to the width of the parent. 
Css :: best box shadow 
Css :: css prevent text wrap 
Css :: input padding without changing width 
Css :: grid template columns 
Css :: center an image 
Css :: bootstrap breakpoints 
Css :: how to remove bullet in css 
Css :: font face css 
Css :: linear-gradient 
Css :: material icons after css 
Css :: css good background color 
Css :: media screen smartphone 
Css :: placeholder color 
Css :: autocomplete widget not working in modal popup 
Css :: how to create multicolor text in css 
Css :: css center div 
Css :: sticky footer not working bootstrap 
Css :: vertical and horizontal align center div 
Css :: disable checkbox click event 
Css :: css change all text 
Css :: overflow property 
Css :: width css 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =