0

is there a possibility to make something like:

<div className="row">
 <div className="col-sm-4">1</div>
 <div className="col-sm-4">1</div>
 <div className="col-sm-4">1</div>
 <div className="col-sm-4">1</div>
 <div className="col-sm-4">1</div>
 <div className="col-sm-4">1</div>
 <div className="col-sm-4">1</div>
 <div className="col-sm-4">1</div>
 <div className="col-sm-4">1</div>
</div>

BUT i want a overflow , not a new Line

Thanks for help!

2
  • You mean, horizontal scroll? Commented May 19, 2020 at 10:34
  • yes, exactly, it work with text and so on ... but not with columns .., whenever i add more columns then the size of 12 .. it creates a new Row or lets call it Line .. Commented May 19, 2020 at 10:36

2 Answers 2

2

Bootstrap has the flex-nowrap class available for this purpose.

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">

<div class="row flex-nowrap">
 <div class="col-sm-4">1</div>
 <div class="col-sm-4">1</div>
 <div class="col-sm-4">1</div>
 <div class="col-sm-4">1</div>
 <div class="col-sm-4">1</div>
 <div class="col-sm-4">1</div>
 <div class="col-sm-4">1</div>
 <div class="col-sm-4">1</div>
 <div class="col-sm-4">1</div>
</div>

Codepen Version

Sign up to request clarification or add additional context in comments.

Comments

0

Use flex-wrap: nowrap to row with bootstrap class flex-nowrap

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>


<div class="row flex-nowrap">
  <div class="col-sm-4">1</div>
  <div class="col-sm-4">1</div>
  <div class="col-sm-4">1</div>
  <div class="col-sm-4">1</div>
  <div class="col-sm-4">1</div>
  <div class="col-sm-4">1</div>
  <div class="col-sm-4">1</div>
  <div class="col-sm-4">1</div>
  <div class="col-sm-4">1</div>
</div>

1 Comment

tell me for more help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.