Поместите изображение за div с текстовым полем

Мне нужна помощь для размещения изображения за div (container_3_text). Изображение должно покрывать весь div (container_3), который находится за текстовым div. Я пробовал позиционировать относительное и абсолютное, но это не сработало или, может быть, я делаю это неправильно. Мое изображение взято из моей учетной записи Wordpress, поэтому я не пишу его в ссылке. Помогите пожалуйста студенту :) спасибо

.fixfloat {
  clear: both;
}
.container_3 {
  margin-bottom: 63px;
}
.container_3 img {
  height: 830px;
  width: 1840px;

}
.container_3_text {
  margin-right: 63px;
  margin-top: 290px;
  margin-bottom: 60px;
  padding-top: 50px;
  padding-bottom: 60px;
  background: white;
  display: inline-block;
  max-width: 500px;
  float: right;
}
.container_3_text .padding {
  padding-left: 30px;
  padding-right: 70px;
}
.container_3_text .text {
  min-height: 130px;
}
.container_3_heading {
  margin-bottom: 46px;
}
.container_3_heading .date {
  font-size: 20px;
  font-weight: 500px;
  float: right;
}
.container_3_heading .focus {
  background: #04fbc7;
  font-size: 20px;
  font-weight: 500px;
  letter-spacing: 0.025em;
  padding-right: 6px;
  padding-left: 12px;
  color: white;
}
.container_3_title {
  font-size: 50px;
  margin-bottom: 38px;
  line-height: 1;
}
.column_text3 {
  width: 790px;
  margin: 0 auto;
}
.column_text3 span {
  font-size: 36px;
  font-weight: 500;
}
.column_text3 p {
  font-size: 20px;
  margin-top: 18px;
  color: #b2b2b2;
}
<div class = "grid_big">
  <div class = "container_3">
    <img src = "Image from Wordpress account" />
    <div class = "container_3_text">
      <div class = "padding">
        <div class = "container_3_heading">
          <span class = "focus">In focus</span>
          <span class = "date">2018 09 05</span>
        </div>
        <div class = "container_3_title">
          <p>Production/p>
        </div>
        <div class = "text"> jdejdiefbghewfgewf
        </div>
        <div class = "readmore">
          <span class = "readmore_text">gihegegkoeef</span>
          <span class = "arrow bgimgsprite"></span>
        </div>
      </div>
    </div>
    <div class = "fixfloat"></div>
  </div>
</div>
Улучшение производительности загрузки с помощью Google Tag Manager и атрибута Defer
Улучшение производительности загрузки с помощью Google Tag Manager и атрибута Defer
В настоящее время производительность загрузки веб-сайта имеет решающее значение не только для удобства пользователей, но и для ранжирования в...
Введение в CSS
Введение в CSS
CSS является неотъемлемой частью трех основных составляющих front-end веб-разработки.
Как выровнять Div по центру?
Как выровнять Div по центру?
Чтобы выровнять элемент <div>по горизонтали и вертикали с помощью CSS, можно использовать комбинацию свойств и значений CSS. Вот несколько методов,...
Навигация по приложениям React: Исчерпывающее руководство по React Router
Навигация по приложениям React: Исчерпывающее руководство по React Router
React Router стала незаменимой библиотекой для создания одностраничных приложений с навигацией в React. В этой статье блога мы подробно рассмотрим...
Система управления парковками с использованием HTML, CSS и JavaScript
Система управления парковками с использованием HTML, CSS и JavaScript
Веб-сайт по управлению парковками был создан с использованием HTML, CSS и JavaScript. Это простой сайт, ничего вычурного. Основная цель -...
Toor - Ангулярный шаблон для бронирования путешествий
Toor - Ангулярный шаблон для бронирования путешествий
Toor - Travel Booking Angular Template один из лучших Travel & Tour booking template in the world. 30+ валидированных HTML5 страниц, которые помогут...
1
0
75
4

Ответы 4

Вы можете использовать:

div.background_image{
   background: url('some_ulr');
   background-position: center;
   background-size: cover;
   background-repeat: no-repeat;
}

Просто используйте background-image: url(); и background-size: cover

.fixfloat {
  clear: both;
}
.container_3 {
  background-image: url(https://d2v9y0dukr6mq2.cloudfront.net/video/thumbnail/rOWJ-45_eiyypas7p/film-production-light-turning-on-smoke-background_ribhftic_l_thumbnail-full03.png);
  background-position: center;
  background-size:cover;
  margin-bottom: 63px;	
}
.container_3_text {
  margin-right: 63px;
  margin-top: 290px;
  margin-bottom: 60px;
  padding-top: 50px;
  padding-bottom: 60px;
  background: white;
  display: inline-block;
  max-width: 500px;
  float: right;
}
.container_3_text .padding {
  padding-left: 30px;
  padding-right: 70px;
}
.container_3_text .text {
  min-height: 130px;
}
.container_3_heading {
  margin-bottom: 46px;
}
.container_3_heading .date {
  font-size: 20px;
  font-weight: 500px;
  float: right;
}
.container_3_heading .focus {
  background: #04fbc7;
  font-size: 20px;
  font-weight: 500px;
  letter-spacing: 0.025em;
  padding-right: 6px;
  padding-left: 12px;
  color: white;
}
.container_3_title {
  font-size: 50px;
  margin-bottom: 38px;
  line-height: 1;
}
.column_text3 {
  width: 790px;
  margin: 0 auto;
}
.column_text3 span {
  font-size: 36px;
  font-weight: 500;
}
.column_text3 p {
  font-size: 20px;
  margin-top: 18px;
  color: #b2b2b2;
}
<div class = "grid_big">
  <div class = "container_3">
    <div class = "container_3_text">
      <div class = "padding">
        <div class = "container_3_heading">
          <span class = "focus">In focus</span>
          <span class = "date">2018 09 05</span>
        </div>
        <div class = "container_3_title">
          <p>Production/p>
        </div>
        <div class = "text"> jdejdiefbghewfgewf
        </div>
        <div class = "readmore">
          <span class = "readmore_text">gihegegkoeef</span>
          <span class = "arrow bgimgsprite"></span>
        </div>
      </div>
    </div>
    <div class = "fixfloat"></div>
  </div>
</div>

попробуй это

.container_3_text{
background: url('some_ulr');
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}

Сделайте .container_3_text абсолютным в соответствии с вашим html.

.fixfloat {
  clear: both;
}

.container_3 {
  margin-bottom: 63px;
}

.container_3 img {
  height: 830px;
  width: 1840px;
}

.container_3_text {
  right: 63px;
  top: 290px;
  margin-bottom: 60px;
  padding-top: 50px;
  padding-bottom: 60px;
  background: white;
  display: block;
  max-width: 500px;
  position: absolute;
}

.container_3_text .padding {
  padding-left: 30px;
  padding-right: 70px;
}

.container_3_text .text {
  min-height: 130px;
}

.container_3_heading {
  margin-bottom: 46px;
}

.container_3_heading .date {
  font-size: 20px;
  font-weight: 500px;
  float: right;
}

.container_3_heading .focus {
  background: #04fbc7;
  font-size: 20px;
  font-weight: 500px;
  letter-spacing: 0.025em;
  padding-right: 6px;
  padding-left: 12px;
  color: white;
}

.container_3_title {
  font-size: 50px;
  margin-bottom: 38px;
  line-height: 1;
}

.column_text3 {
  width: 790px;
  margin: 0 auto;
}

.column_text3 span {
  font-size: 36px;
  font-weight: 500;
}

.column_text3 p {
  font-size: 20px;
  margin-top: 18px;
  color: #b2b2b2;
}
<div class = "grid_big">
  <div class = "container_3">

    <img src = "https://via.placeholder.com/830x1840" />

    <div class = "container_3_text">
      <div class = "padding">

        <div class = "container_3_heading">
          <span class = "focus">In focus</span> <span class = "date">2018 09 05</span>
        </div>

        <div class = "container_3_title">
          <p>Production/p>
        </div>

        <div class = "text"> jdejdiefbghewfgewf
        </div>
        <div class = "readmore">
          <span class = "readmore_text">gihegegkoeef</span> <span class = "arrow bgimgsprite"></span>
        </div>

      </div>
    </div>

    <div class = "fixfloat"></div>
  </div>
</div>

Другие вопросы по теме