W
W
WebforSelf2018-06-20 22:30:47
css
WebforSelf, 2018-06-20 22:30:47

How to make floating block in bootstrap 3?

Friends, there is a site on the bootstrap, and there was a need to make a fixed block when scrolling.
there is such a code

<div class="container">
<div class="row">
<div class="col-md-9">Просто текст</div>
<div class="col-md-3">фиксированный блок при скроллинге</div>
</div>
</div>

the essence is this, I found the bootstrap function .affix I
set the parameters, but when scrolling, adding position: fixed, the block goes beyond the container
div, which is 1170px and nestles against the corner for example. How to make it fixed in the limit of container.
Of course, you can adjust the margin, but on a large display, your margin will be. How to be in such a situation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tyzberd, 2018-06-20
@tyzberd

do not set left, right and will not fly away. Right there https://www.w3schools.com/bootstrap/trybs_affix_ve...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question