Половина контейнера, половина жидкости контейнера - PullRequest
0 голосов
/ 17 мая 2019

ребята, я пытаюсь создать макет, в котором у меня есть контейнер с 2 столбцами, однако правильный столбец должен располагаться справа от экрана, а не справа от контейнера ...если это имеет смысл?

<div class="container">
    <div class="row">
        <div class="col-lg-6">
            this content is inside the container normally
        </div>
        <div class="col-lg-6">
            image will go here, but needs to be positioned to the right of the screen, not to the right of the container
        </div>
    </div>
</div>

Ответы [ 2 ]

0 голосов
/ 17 мая 2019

Попробуйте поместить текст в div, а затем добавьте к нему класс mr-0.

0 голосов
/ 17 мая 2019

Вот как вы можете это сделать.

Рабочий пример

<div class=".parent">
  <div class="child">
    image will go here, but needs to be positioned to the right of the screen, not to the right of the container
  </div>
  <div class="abs">
    <div class="container">
      <div class="row">
        <div class="col-sm-6">
          this content is inside the container normallythis content is inside the container normally
        </div>
      </div>
    </div>
  </div>
</div>

.parent {
  position: relative;
}

.child {
  float: right;
  width: 50%;
  background: red;
}

.abs {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.container {
  border: 1px solid green;
}
...