As you can see in the picture above, the image on the right side is somehow not stretching to the full parent height. Why is this and how can I, without defining a specific height for the parent, always make sure that the image stays on the very edges of the parent? That is, without using background-size: cover;
or any CSS pertaining to removing the img
tag.
I've tried using this thread: click here
However, I turned unsuccessful.
HTML
<div class="scheme center-center">
<div class="superintendent center-center">
<div class="details">
<div class="hero hero-initial">
<div class="container">
<div class="wrapper text-center">
<div class="hero-header">
<h1>Welcome back!</h1>
</div>
</div>
</div>
</div>
<form class="form" action="#" method="post">
<div class="container">
<label for="author-name">Author's Name</label>
<input type="text" placeholder="John Doe"name="author-name" required>
<label for="password">Password</label>
<input type="password" placeholder="Password" name="author-name" required>
<input type="submit" class="submission" value="Continue from where you left off">
</div>
</form>
</div>
<div class="graphics">
<div class="hero-img scheme-img">
<img src="/assets/img/about-us1.jpg" width="100%">
</div>
</div>
</div>
</div>
CSS
.scheme {
height: 940px;
width: 100%;
background-color: #f2f2f2;
}
.superintendent {
width: 900px;
height: auto;
border-radius: 5px;
background-color: #fff;
-webkit-box-shadow: 3px 6px 30px -2px rgba(0,0,0,0.51);
-moz-box-shadow: 3px 6px 30px -2px rgba(0,0,0,0.51);
box-shadow: 3px 6px 30px -2px rgba(0,0,0,0.51);
}
.details {
float: left;
width: 60%;
height: inherit;
}
.graphics {
float: right;
width: 40%;
height: auto; /* Same height as the image currently in use */
}
.scheme-img {
width: auto;
height: auto;
}
.hero-initial {
height: auto;
padding: 30px 0 0;
}
.hero-initial h1 {
font-size: 2.4em;
font-weight: 500;
}
.form {
max-width: 400px;
height: inherit;
margin: auto;
padding: 0 0 30px 0;
}
label {
padding: 15px 0;
display: inline-block;
font-weight: 600;
letter-spacing: 0.4px;
font-weight: 400;
}
input[type=text], input[type=password] {
width: 100%;
padding: 15px 10px;
display: inline-block;
font-size: 1em;
border-radius: 5px;
background-color: #f2f2f2;
border: 1px solid #f2f2f2;
outline: none;
}
input[type=submit] {
width: 100%;
display: inline-block;
text-align: center;
padding: 15px 10px;
font-size: 1em;
cursor: pointer;
margin: 35px 0;
transition: 0.2s ease-in-out;
}
I will be happy to assist anyone further in clarifying this question!