I’m working on a design using the count-column property. Everything is mostly fine, but I’m encountering an issue where some of my boxes are getting cut off. Here is the URL to the screenshot (https://ibb.co/hmk4ZBZ).
The problem arises when I set the width of the child boxes. If I set the width to 100%, it works correctly. However, when I set the width to 320px, some of the boxes get cut off.
Could someone please help me understand why this is happening and how I can fix it?
Thank you in advance!
function Reviews() {
return (
<section id='Reviews'>
<div className="reviews-container">
<p className='features-heading' id='review-heading'>What the community is saying</p>
<div className="review-tweet-container">
<div className="review-tweet">
<div className="username-and-picture-container">
<div className="img-container">
<img src="https://images.unsplash.com/photo-1592621385612-4d7129426394?q=80&w=1887&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="" />
</div>
<div className="username-container">
<p id='username-main'>Ayca Oncu</p>
<p id='username-second'>@ayca_oncu</p>
</div>
</div>
<div className="text-container">
<p>Love this Chrome Extension @momentumdash! Especially today, having my happy place as a background with a simple yet powerful message "Be Happy, Ayça" - that's all we need!</p>
</div>
<div className="date-container">
<p>Jun 30, 2020</p>
</div>
</div>
<!-- Additional review-tweet divs omitted for brevity -->
</div>
</div>
</section>
)
}
export default Reviews
#Reviews {
min-height: 100vh;
width: 100%;
background-color: #F2F3F3;
}
.reviews-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4rem;
}
#review-heading {
text-align: center;
align-items: center;
display: inline-block;
background-color: aqua;
}
.review-tweet-container {
background-color: blue;
column-count: 3;
}
.review-tweet {
min-height: 100px;
width: 280px;
margin-bottom: 1.25rem;
padding: 20px;
display: flex;
flex-direction: column;
align-items: right;
gap: 0.5rem;
border-radius: 12px;
border: 0.5px solid var(--dark-grey-color);
background-color: var(--white-color);
}
.username-and-picture-container {
display: flex;
align-items: center;
gap: 0.5rem;
}
Huzaifa Zahid is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.