0

I am trying to make a design where some text of id="text-field" will overlap to id="image-field". I have no idea how to do this, Thank you for your help.

<!DOCTYPE html>
<html>
    <body>
        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-6" id="text-field"> Some text </div>
                <div class="col-sm-6" id="link-field"> Some link </div>
            </div>
            <div class="row">
                <div class="col-sm-12" id="image-field">Background Image </div>
            </div>
        </div>
    </body>
</html>
phpLover
  • 155
  • 1
  • 2
  • 14

2 Answers2

2

I made a small re-usable example it's a fairly common thing to do with css here

Here is a example

.box {
  position: relative;
}
.box__image {} .box__text {
  position: absolute;
  bottom: 0;
}
<div class="box">
  <div class="box__image">
    <img src="http://placehold.it/350x150">
  </div>
  <div class="box__text">
    Testing text
  </div>
</div>

Just a small explanation position:relative is used to keep position:absolute elements from going out of their containing div

Abhishek Pandey
  • 13,302
  • 8
  • 38
  • 68
NooBskie
  • 3,761
  • 31
  • 51
0

Using position properties you can ser postion of elements.

#image-field{
    position: absolute;
    top: 0px;
}

Research on postions property of css.You will get more idea postion properties

Mr.Pandya
  • 1,899
  • 1
  • 13
  • 24