Reputation: 9
I don't know why but my input is unclickable.
I saw there were a conflict with class class="cta-inner text-center rounded"
but i would like to keep the design of this class.
If anyone have an idea
body {
font-family: 'Lora';
background: -webkit-gradient(linear, left top, left bottom, from(rgba(47, 23, 15, 0.65))), url("../img/bg.jpg");
background: linear-gradient(rgba(47, 23, 15, 0.65)), url("../img/bg.jpg");
background-attachment: fixed;
background-position: center;
background-size: cover;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: 'Raleway';
}
nav {
flex-direction: row;
}
p {
line-height: 1.75;
}
.text-faded {
color: rgba(255, 255, 255, 0.3);
}
.site-heading {
margin-top: 5rem;
margin-bottom: 5rem;
text-transform: uppercase;
line-height: 1;
font-family: 'Raleway';
}
.site-heading .site-heading-upper {
display: block;
font-size: 2rem;
font-weight: 800;
}
.site-heading .site-heading-lower {
font-size: 5rem;
font-weight: 100;
line-height: 4rem;
}
.page-section {
margin-top: 5rem;
margin-bottom: 5rem;
}
.section-heading {
text-transform: uppercase;
}
.section-heading .section-heading-upper {
display: block;
font-size: 1rem;
font-weight: 800;
}
.section-heading .section-heading-lower {
display: block;
font-size: 3rem;
font-weight: 100;
}
.bg-faded {
background-color: rgba(255, 255, 255, 0.85);
}
#mainNav {
background-color: rgba(47, 23, 15, 0.9);
font-family: 'Raleway';
}
#recherche {
size: 1500px;
}
#valider {
text-align: right;
}
#mainNav .navbar-brand {
color: #e6a756;
}
#mainNav .navbar-nav .nav-item .nav-link {
color: rgba(255, 255, 255, 0.7);
font-weight: 800;
}
#mainNav .navbar-nav .nav-item.active .nav-link {
color: #e6a756;
}
@media (min-width: 992px) {
#mainNav .navbar-nav .nav-item .nav-link {
font-size: 0.9rem;
}
#mainNav .navbar-nav .nav-item .nav-link:hover {
color: rgba(255, 255, 255, 0.4);
}
#mainNav .navbar-nav .nav-item.active .nav-link:hover {
color: #e6a756;
}
}
.btn-xl {
font-weight: 700;
font-size: 0.8rem;
padding-top: 1.5rem;
padding-bottom: 1.5rem;
padding-left: 2rem;
padding-right: 2rem;
}
.intro {
position: relative;
}
@media (min-width: 992px) {
.intro .intro-img {
width: 75%;
float: right;
}
.intro .intro-text {
left: 0;
width: 60%;
margin-top: 3rem;
position: absolute;
}
.intro .intro-text .intro-button {
width: 100%;
left: 0;
position: absolute;
bottom: -2rem;
}
}
@media (min-width: 1200px) {
.intro .intro-text {
width: 45%;
}
}
.cta {
padding-top: 5rem;
padding-bottom: 5rem;
background-color: rgba(230, 167, 86, 0.9);
}
.cta .cta-inner {
position: relative;
padding: 3rem;
margin: 0.5rem;
background-color: rgba(255, 255, 255, 0.85);
}
.cta .cta-inner:before {
border-radius: 0.5rem;
content: '';
position: absolute;
top: -0.5rem;
bottom: -0.5rem;
left: -0.5rem;
right: -0.5rem;
border: 0.25rem solid rgba(255, 255, 255, 0.85);
}
@media (min-width: 992px) {
.about-heading .about-heading-img {
position: relative;
z-index: 0;
}
.about-heading .about-heading-content {
margin-top: -5rem;
position: relative;
z-index: 1;
}
}
@media (min-width: 992px) {
.product-item .product-item-title {
position: relative;
z-index: 1;
margin-bottom: -3rem;
}
.product-item .product-item-img {
position: relative;
z-index: 0;
max-width: 60vw;
}
.product-item .product-item-description {
position: relative;
z-index: 1;
margin-top: -3rem;
max-width: 50vw;
}
}
.list-hours {
font-size: 0.9rem;
}
.list-hours .list-hours-item {
border-bottom: 1px solid rgba(230, 167, 86, 0.5);
padding-bottom: .25rem;
margin-bottom: 1rem;
font-style: italic;
}
.list-hours .list-hours-item.today {
font-weight: bold;
color: #e6a756;
}
@media (min-width: 992px) {
.list-hours {
width: 50%;
font-size: 1.1rem;
}
}
.address strong {
font-size: 1.2rem;
}
.footer {
background-color: rgba(47, 23, 15, 0.9);
}
.text-primary {
color: #e6a756 !important;
}
.bg-primary {
background-color: #e6a756 !important;
}
.btn {
-webkit-box-shadow: 0px 3px 3px 0px rgba(33, 37, 41, 0.1);
box-shadow: 0px 3px 3px 0px rgba(33, 37, 41, 0.1);
}
.btn-primary {
background-color: #e6a756;
border-color: #e6a756;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
background-color: #df902a;
border-color: #df902a;
}
.font-weight-light {
font-weight: 100 !important;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<section class="page-section cta">
<div class="row">
<div class="col-xl-9 mx-auto">
<div class="cta-inner text-center rounded">
<h2 class="section-heading mb-5">
<span class="section-heading-upper">Ajouter un</span>
<span class="section-heading-lower">Contact</span>
</h2>
<form action="envoi.php" method="post" enctype="multipart/form-data" class="list-unstyled list-hours mb-5 text-left mx-auto">
<div class="list-unstyled-item list-hours-item d-flex">Nom<br>
<input class="ml-auto" type="text" name="Nom" required><br>
</div>
<div class="list-unstyled-item list-hours-item d-flex">Entreprise<br>
<input class="ml-auto" type="text" name="Entrprise" required><br>
</div>
<div class="list-unstyled-item list-hours-item d-flex">Numéro de téléphone<br>
<input class="ml-auto" name="tel"><br>
</div>
<div class="list-unstyled-item list-hours-item d-flex">Commentaire<br>
<input class="ml-auto" type="text" name="Commentaire"><br>
</div>
<div>
<input id="valider" class="btn btn-default btn-lg active" type="submit" value="Valider">
</div>
</form>
</div>
</div>
</div>
</section>
Thanks by advance
Upvotes: 1
Views: 610
Reputation: 3572
Try setting the inputs position to relative:
.cta .cta-inner input{
position: relative;
}
The CSS .cta .cta-inner:before
is overlapping the inputs, that's why you can't click them. With the change of the position of the inputs they are clickable again. Check out this Fiddle
Removing .cta .cta-inner:before
from your CSS will alter the style since you won't have your double border design:
Upvotes: 0
Reputation: 2856
Your CSS is causing a div in front of your input.
Due of this your input is not clickable.
This is your wrong css block.
.cta .cta-inner:before {
border-radius: 0.5rem;
content: '';
position: absolute;
top: -0.5rem;
bottom: -0.5rem;
left: -0.5rem;
right: -0.5rem;
border: 0.25rem solid rgba(255, 255, 255, 0.85);
}
Just remove this, as its not used and not visible for the user.
Then it should be fixed!
Check out this jsfiddle I made for you: https://jsfiddle.net/9zvoecq4/
Upvotes: 1