R
R
Roman2020-02-20 00:51:29
Bootstrap
Roman, 2020-02-20 00:51:29

Using Bootstrap to implement - two columns in the middle, the third is all the free space to the right of them?

Please tell me how to make a form.
It is required to implement 3 columns.
The first two should be displayed in the middle of the screen (they occupy col-sm-1 and col-sm-3, respectively, in them a label and an input)
The third column with errors.

How to implement, so that when an error occurs, the positioning of the form is in the middle (that is, the first two columns were in the middle, without shifting them, they were displayed to the right of them and occupied all the remaining space)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey delphinpro, 2020-02-20
@delphinpro

Well, if bootstrap, then it's like simple mathematics, to distribute the space between the 12 columns:
1 + 3 = 4
12 - 4 = 8
8 / 2 = 4;
col-4 (empty) + col-1 (first) + col-3 (second) + col-4 (errors)
Instead of an empty column, you can (and probably should) use offset-4 for the first column

V
Viktor Taran, 2020-02-20
@shambler81

Changing the location of interface elements depending on the change in the status of one of the values ​​is not even a design error, but a brain error.
What you say is easy to do, but you are fundamentally wrong in making such an interface.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question