Morad Morad - 1 year ago 69
CSS Question

How to add multiple elements under each other next to an image?

Im new to web development and I just started out my first project.

The problem is that I can't seem to float multiple elements under each other next to an image. One floats at the very top next to the image, and the other
floats at the very bottom next to the image. I want them to both be under
each other.

This is what I have


<div class="container">
<div class="Main-Heading text-center ">
<h1>Albert Einstein 1879-1955</h1>

<div class="picture">
<img class="img-rounded img-thumbnail img-responsive" src="" name="Albert Einstein" alt="Albert Einstein posing for a picture with his hands crossed">
<blockquote cite="">
The important thing is not to stop questioning. Curiosity has its own reason for existing.
<p>Albert Einstein was a German-born theoretical physicist.</p>



This is what I have


.Main-Heading h1 {
display: inline-block;
color: black;
font-size: 70px;
font-family: Candal;

.picture p {
float: right;
display: inline-block:

.picture blockquote {
float: right;
font-family: Pacifico, sans-serif;
font-size: 17px;

.container {
background-color: rgb(230, 230, 230);
.main_text {


.picture {
display: inline-block;

body {


Answer Source

Float your image left.

Add this to your css:

.picture img {
   float: left;

Don't forget to clear afterwards too but putting a <div style="clear: both;"></div> after your floated elements.

See this previously asked question which also may provide some handy information.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download