L
L
larka_skaz2017-08-19 17:38:59
css
larka_skaz, 2017-08-19 17:38:59

How to make something like this in bootstrap (problems with output from the flow and positioning in css)?

Hello. I have never been a coder, but I had to file a simple website on bootstrap.
The task is very simple, there are three divas. Two fit into one. Attached is the structure and code. What to write in CSS so that the block with text is taken out of the flow and aligned to the top edge of the parent div?

<div class="jumbotron">
    <div class="container main-screen">
      <div class="main-img"><img src="img/main.svg"></div>
      <div class="main-text">
        <P>Example text</p>
      </div>
    </div> 
  </div>

35bfee1ef8a24766a9f199d5257e1937.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
profesor08, 2017-08-19
@larka_skaz

Answer to the question from the text:

.main-screen {
  position: relative;
}

.main-text {
  position: absolute;
  left: 0;
  top: 0;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question