0

I am trying to move the "A short summary of Erik Spikemann" along with the

under it. I want to place it next to the large photo of him as seen on the left side. I've tried doing a float left but for some reason that isn't working at all. I've attached my code.Full photo of the page

J Kardash
  • 1
  • 1
  • 2
    @J Kardash: Maybe you want to paste the code or sections you suspect could be causing the problem on the page first? – user1538798 Feb 26 '20 at 00:36
  • It seems also that a part of your question is being hidden... [ along with the (?)]. If it's a code, select it and click on the code button in the editor ({}). – Bilel Feb 26 '20 at 00:46

1 Answers1

2

Use Flexbox or Grid. I'll give you an example for Flexbox that you can reflect on your own case and you can search for the other.

.container {
  display:flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
 }
 
 img {
  width: 400px;
  height: 400px;
  margin-right: 10px;
 }
<div class = "container">
<img src = "https://www.w3schools.com/howto/img_avatar.png" alt = "Image" />

<p>Some text</p>
</div>

The idea here is you need to wrap your image and text with a parent div and make it a Flexbox.

flex-direction: row;     => Place the items side by side

justify-content: center; => Center the items horizontally

align-items: center;     => Center the items vertically

I encourage you to checkout this guide about Flexbox

Mohamed Wagih
  • 1,246
  • 6
  • 17