0

I have an image that looks like this: enter image description here

I need to put the text below the image.

Can you tell me where I'm going wrong?

.outer-circle {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  text-align: center;
  background-color: #dedede;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-div {
  align-items: center;
  justify-content: center;
  display: flex;
}
<div class="main-div">
  <div class="outer-circle">
    <img :src="Commments" style="width: 250px; filter: grayscale(100%); display: block;" />
  </div>
  <br />
  <p style="display: block; text-align: center;">No Comments</p>
</div>

1
  • Have a look of flex-direction Commented May 24, 2019 at 11:44

2 Answers 2

3

Set flex-direction: column on .main-div (which is set by default to row)

Also the <br> is not needed

.outer-circle {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  text-align: center;
  background-color: #dedede;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-div {
  align-items: center;
  justify-content: center;
  display: flex;
  flex-direction: column
}
<div class="main-div">
  <div class="outer-circle">
    <img :src="Commments" style="width: 250px; filter: grayscale(100%); display: block;" />
  </div>
 
  <p style="display: block; text-align: center;">No Comments</p>
</div>

Sign up to request clarification or add additional context in comments.

Comments

0

if you want to put description to the picture use this:

<figure>
 <img :src="Commments" style="width: 250px; filter: grayscale(100%); display: block;">
 <figcaption>no comment</figcaption>
</figure> 

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.