I'm facing trouble understanding what's going on. The problem is with the <a>
tag to which I've set some padding and radius to make it like a button. But I see it overflows the container like this-
It seems like the container sets its boundary immediately after get started text. So I want to know why does the <a>
's padding overflow the container?
Here's react component-
JSX-
const topSection = ()=> {
return (
<section className="top-section">
<img className="img-intro" src="./images/illustration-intro.png" alt="illustration-img"/>
<h1>All your files in one secure location, accessible anywhere.</h1>
<p>Fylo stores all your most important files in one secure location. Access them wherever
you need, share and collaborate with friends family, and co-workers.</p>
<a href="/">Get Started</a> //ISSUES WITH THIS ONE
</section>
)
}
SASS-
@import "../../colors.scss";
.top-section {
text-align: center;
background: url("/images/bg-curvy-mobile.svg") center bottom/150% 75% no-repeat border-box;
margin-top: 5%;
img {
width: 100%;
margin-bottom: 10%;
}
h1, p, a {
margin-top: 5%;
margin-bottom: 5%;
}
h1 {
font-size: 1.4rem;
line-height: 1.5;
}
a {
color: white;
background: color(get-started);
padding: 1em 6em;
border-radius: 2em;
margin: 10% auto;
}
}