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.
Asked
Active
Viewed 1,704 times
1 Answers
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