-1

I'm trying to float text beside an image but it always gets shoved to the bottom of it. I have floated one to the right and one to the left with no avail.

HyperPXLZ
  • 15
  • 5
  • 4
    Welcome to StackOverflow, your question should contain a [Minimal, Complete and Verifiable Example](http://stackoverflow.com/help/mcve). – hungerstar Apr 03 '17 at 18:07

1 Answers1

1

Is this by any chance what you're looking for? Plunker

css

.myClass {
  border: 1px black solid;
  display: inline-block;
  text-align: left;
  padding: 15px;
  margin: 15px;
  float: left;
}
img {
  margin: 15px;
}

html

<!DOCTYPE html>
<html>

  <head>
    <link rel="stylesheet" href="style.css">
    <script src="script.js"></script>
  </head>

  <body>
    <div class="myClass">
      <h1>Hello Plunker!</h1>
      <p>This is some text besides a photo</p>
    </div>
    <img src="http://placehold.it/350x150">
  </body>

</html>
totallytotallyamazing
  • 2,765
  • 1
  • 20
  • 26