Reputation: 1333
I found this example on the Internet. Can it fix in order to the text isn't over the button? Limit not by symbols, but visually.
Now it looks like this:
I would like to do this
Is that possible? I would like to use this template, but I have little experience to fix it. The template initially with such a bug. I didn't change anything. Original.
Thanks in advance for any help!
:root {
background: #f5f6fa;
color: #9c9c9c;
font: 1rem "PT Sans", sans-serif;
}
html,
body,
.container {
height: 100%;
}
a {
color: inherit;
}
a:hover {
color: #7f8ff4;
}
.container {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.uppercase {
text-transform: uppercase;
}
.btn {
display: inline-block;
background: transparent;
color: inherit;
font: inherit;
border: 0;
outline: 0;
padding: 0;
-webkit-transition: all 200ms ease-in;
transition: all 200ms ease-in;
cursor: pointer;
}
.btn--primary {
background: #7f8ff4;
color: #fff;
box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.1);
border-radius: 2px;
padding: 12px 36px;
}
.btn--primary:hover {
background: #6c7ff2;
}
.btn--primary:active {
background: #7f8ff4;
box-shadow: inset 0 0 10px 2px rgba(0, 0, 0, 0.2);
}
.btn--inside {
margin-left: -96px;
}
.form__field {
width: 500px;
background: #fff;
color: #a3a3a3;
font: inherit;
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.1);
border: 0;
outline: 0;
padding: 22px 18px;
}
<div class="container">
<div class="container__item">
<form class="form">
<input type="email" class="form__field" placeholder="Your E-Mail Address" />
<button type="button" class="btn btn--primary btn--inside uppercase">Send</button>
</form>
</div>
</div>
Upvotes: 0
Views: 27
Reputation: 111
You can try "padding-right" for the input
:root {
background: #f5f6fa;
color: #9c9c9c;
font: 1rem "PT Sans", sans-serif;
}
html,
body,
.container {
height: 100%;
}
a {
color: inherit;
}
a:hover {
color: #7f8ff4;
}
.container {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.uppercase {
text-transform: uppercase;
}
.btn {
display: inline-block;
background: transparent;
color: inherit;
font: inherit;
border: 0;
outline: 0;
padding: 0;
-webkit-transition: all 200ms ease-in;
transition: all 200ms ease-in;
cursor: pointer;
}
.btn--primary {
background: #7f8ff4;
color: #fff;
box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.1);
border-radius: 2px;
padding: 12px 36px;
}
.btn--primary:hover {
background: #6c7ff2;
}
.btn--primary:active {
background: #7f8ff4;
box-shadow: inset 0 0 10px 2px rgba(0, 0, 0, 0.2);
}
.btn--inside {
margin-left: -96px;
}
.form__field {
width: 500px;
background: #fff;
color: #a3a3a3;
font: inherit;
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.1);
border: 0;
outline: 0;
padding: 22px 18px;
padding-right:100px;
box-sizing: border-box;
}
<div class="container">
<div class="container__item">
<form class="form">
<input type="email" class="form__field" placeholder="Your E-Mail Address" />
<button type="button" class="btn btn--primary btn--inside uppercase">Send</button>
</form>
</div>
</div>
Upvotes: 4