2
<div className={"col-7 name"}>&thinsp;</div>

When this loads into my page, the column is too big. I want to make it more narrow, and if possible, I want to apply an attribute directly inside the div.

What attributes can I add to col-7 name and what is the proper way to do it ?

1

2 Answers 2

2

Bootstrap's grid system uses 12 columns per row. You specify the column width using the syntax className='col-*'.

Just change the * to the number of columns out of 12 you would like. For example, a div with className='col-6' will be half the width of a div with className='col-12'.

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

Comments

0

I think you are using bootstrap

total column is 12, so you can use col-12

example:

  1. col-8 for 1 columns, col-4 for 1 columns

  2. col-4 for 3 columns

  3. col-6 for 2 columns

you can try to take a look from their documentation

https://getbootstrap.com/docs/4.4/layout/grid/

Comments

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.