I am encountering an issue with my div. I have floated an image to the right and placed my text beside it. My aim is to create a div with a linear gradient, however, the div ends up filling the entire page.
How can I make my div adjust to fit only its contents?
I attempted using the inline-block method but it just pushes my text below the image.
The problem:
https://i.stack.imgur.com/q5zEk.png
Code:
.Popcorn {
float: right;
position: relative;
top: -45px;
}
.Software {
padding: 4px;
min-width: 100%;
padding-top: 20px;
background: rgba(0, 0, 0, 0) linear-gradient(to bottom, #277FD8 0%, #ffffff 30%, #ffffff 100%) repeat scroll 0 0;
}
<img src="/img/popcorn_edited.png" class="Popcorn" />
<div class="Software">
<h3>The Software You Want!</h3>
<br>
<p>Android is the World's leading mobile and tablet operating system. This means no learning curves for Android users. The media box is powered by Android which allows you to download applications and share it with all your Android devices or vice versa.
You can download from millions of apps, games, books, movies and more on the Google Play store.</p>
</div>