Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
Space between elements in a column react boostrap

I want there to be many small buttons that go across the entire screen. My setup is currently like this

<Row>
    <Col>
        <label className="btn btn-light btn-sm" style={{fontSize: "10px" }}>button text</label>
        <label className="btn btn-light btn-sm" style={{fontSize: "10px" }}>button text</label>
        <label className="btn btn-light btn-sm" style={{fontSize: "10px" }}>button text</label>
        <label className="btn btn-light btn-sm" style={{fontSize: "10px" }}>button text</label>
        ... and so on
    </Col>
</Row>

The effect is achieved, however, the buttons are all touching each other. Is there any way to force a padding around individual elements of a Column? I can't seem to figure out where to put it. Thanks.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You have many possibilities. You could use margin or padding or - what I would prefer - use flexbox with gap property:

  • You could use given bootstrap classes and make Col a flexbox and use the gap property: <Col className="d-flex gap-2">
  • There is also a component for this called Stack: <Stack direction="horizontal" gap={2}>
  • Or, if you need custom gap size, use css in any way directly. For example with inline styles: <Col className="d-flex" style={{ gap: "13px" }}>

https://codesandbox.io/s/beautiful-darkness-91d2ho

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!