I am encountering a strange issue with my code. The button CSS animation only works when the margin-top is set to 125px for the sim-button class. I want to reduce the margin-top to 25px, but then the animation does not work.
Example HTML:
<div class="media" style = "background-color:#000;">
<img class="media__image" src="https://www.offensive-security.com/wp-content/uploads/2012/01/security-risk-assessment-report.png">
<div class="media__body">
<h2>Penetration Report</h2>
<p>Get your hands on our Sample Presentation Report</p>
<div class="sim-button button1" data-toggle="modal" data-target="#getQuoteModal">Download Report</div>
</div>
</div>
CSS Styling:
.media {
display: inline-block;
position: relative;
vertical-align: top;
}
.media__image { display: block; }
/* Additional CSS styles and properties are listed here */
.sim-button{
line-height: 50px;
height: 50px;
text-align: center;
margin-right: auto;
margin-left: auto;
margin-top: 125px; /* Issue with margin-top */
width: 60%;
cursor: pointer;
}
.button1 {
color: rgba(255,255,255,1);
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
position: relative;
border: 1px solid rgba(255,255,255,0.5);
}
.button1 a{
color: rgba(51,51,51,1);
text-decoration: none;
display: block;
}
.button1:hover {
background-color: rgba(255,255,255,0.2);
-webkit-border-radius: 25px;
-moz-border-radius: 25px;
border-radius: 25px;
}
Thank you in advance for any assistance provided.