My goal is to have an orange circle image placed to the right of my headline <h2>
. However, I am facing an issue where the circle jumps above the headline when I shrink the screen. How can I ensure that it stays on the right side no matter the screen size?
.head-text {
position: relative;
margin-top: 12%;
text-align: center;
width: 100%;
height: auto;
background-size: auto;
}
img {
margin: 10 0 0px 0px;
float: right;
width: 40px;
height: 40px;
border-radius: 150px;
border: 2px solid #000000;
}
h2 {
font-weight: bold;
font-family: Calibri;
color: black;
font-size: 4em;
margin: auto;
}
<div class="section" data-menuanchor="thirdPage">
<div class="slide">
<div class="main mainupp">
<div class="myheader border"></div>
<div class="head-text">
<div class="row">
<div class="col-sm-5 col-xs-2">
<div class="post-thumb orange"></div>
</div>
<div class="col-sm-2 col-xs-8">
<h2><img>ASDASD</h2>
</div>
<div class="col-sm-5 col-xs-2"></div>
</div>
</div>