How can I make the image overlap to the next div below it?


same logan


How do you make the image overlap to the next div below it?

If you didn't get my description, this is the function I want. Click here

This is what I have so far

HTML:

<p>overflow:hidden</p>
<div class="hidden">You can use the overflow property when you want to have better control of the layout. The default value is visible. <img src="https://vetstreet.brightspotcdn.com/dims4/default/8fe930e/2147483647/crop/0x0%2B0%2B0/resize/645x380/quality/90/?url=https%3A%2F%2Fvetstreet-brightspot.s3.amazonaws.com%2F57%2Ff65100a80811e0a0d50050568d634f%2Ffile%2FStaffordshire-Bull-Terrier-3-645mk062811.jpg" alt="Image result for dogs staffordshire terrier"/></div>

CSS:

div.hidden {
    background-color: #00FF00;
    width: 100%;
    height: 100px;
    overflow: hidden;
}
Mo Ming

This layout is a bit like your screenshot, but you have to understand CSS positioning properties better. Check, please......

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  overflow: hidden;
}

.ghost {
  position: absolute;
  left: -100%;
}

.framed {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15rem;
  margin-left: -7.5rem;
}

.logo {
  margin-top: -9em;
  cursor: default;
}

.form {
  margin-top: -4.5em;
  transition: 1s ease-in-out;
}

.input {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  font-size: 1.125rem;
  line-height: 3rem;
  width: 100%;
  height: 3rem;
  color: #444;
  background-color: rgba(255, 255, 255, .9);
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  padding: 0 1rem;
  font-family: 'Open Sans', sans-serif;
}

.input:focus {
  outline: none;
}

.input--top {
  border-radius: 0.5rem 0.5rem 0 0;
  border-top: 0;
}

.input--submit {
  background-color: rgba(92, 168, 214, 0.9);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  border-top: 0;
  border-radius: 0 0 0.5rem 0.5rem;
  margin-bottom: 1rem;
}

.text {
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
  text-decoration: none;
}

.text--small {
  opacity: 0.85;
  font-size: 0.75rem;
  cursor: pointer;
}

.text--small:hover {
  opacity: 1;
}

.text--omega {
  width: 200%;
  margin: 0 0 1rem -50%;
  font-size: 1.5rem;
  line-height: 1.125;
  font-weight: normal;
}

.text--centered {
  display: block;
  text-align: center;
}

.text--border-right {
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  margin-right: 0.75rem;
  padding-right: 0.75rem;
}

.legal {
  position: absolute;
  bottom: 1.125rem;
  left: 1.125rem;
}

.photo-cred {
  position: absolute;
  right: 1.125rem;
  bottom: 1.125rem;
}

.fullscreen-bg {
  position: absolute;
  height: 50vh;
  z-index: -1;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: url(https://unsplash.it/1800/700?random.jpg) center;
  background-size: cover;
}

#toggle--login:checked~.form--signup {
  left: 200%;
  visibility: hidden;
}

#toggle--signup:checked~.form--login {
  left: -100%;
  visibility: hidden;
}

@media (height:300px) {
  .legal,
  .photo-cred {
    display: none
  }
}
<input type="radio" checked id="toggle--login" name="toggle" class="ghost" />
<input type="radio" id="toggle--signup" name="toggle" class="ghost" />



<form class="form form--login framed">
  <input type="email" placeholder="Email" class="input input--top" />
  <input type="password" placeholder="Password" class="input" />
  <input type="submit" value="Log in" class="input input--submit" />

  <label for="toggle--signup" class="text text--small text--centered">New? <b>Sign up</b></label>
</form>

<form class="form form--signup framed">
  <h2 class="text text--centered text--omega">Join the other <b>152.6 million</b> blogs and</br>share all that you love.</h2>

  <input type="email" placeholder="Email" class="input input--top" />
  <input type="password" placeholder="Password" class="input" />
  <input type="text" placeholder="Username" class="input" />
  <input type="submit" value="Sign up" class="input input--submit" />

  <label for="toggle--login" class="text text--small text--centered">Not new? <b>Log in</b></label>
</form>
</div>

<div class="fullscreen-bg"></div>

Related


How can I make the text overflow and overlap another div?

CodeBreaker I'm making an interactive periodic table and I'm running into a problem. In my example potassium and 39.0983 are below 2, 8, 8, 1 in separate divs. I need it so that the numbers 2, 8, 8, 1 are overlaid over the potassium so that it doesn't weigh do

How can I put the image next to the div?

Bruna Sylvinia Chat, want to add the user's image next to the div, but I tried without success and see where the image is and where I want to add the image. I don't have any idea how to solve it, can anyone help me? I am using bootstrap .message-content { bo

How can i make a menu like below image in android

You can be young: How to create a shortcut pinned like this , so when the app launches the logo, the user taps long to create a shortcut to navigate to a certain activity, eg: 1: Record voice note 2: Type note 3: ... It is better to use java. Alexander Hoffman

How can I make the text below the image when using flexbox?

Sehagic How to make the text fall below the image. I know that if you use dispaly:inline-block, you can use float:left or float:right. But I'm new to using flexbox, someone out there who knows more about it can help me out with this. big-row { display: flex;

How can i make a menu like below image in android

You can be young: How to create a shortcut pinned like this , so when the app launches the logo, the user taps long to create a shortcut to navigate to a certain activity, eg: 1: Record voice note 2: Type note 3: ... It is better to use java. Alexander Hoffman

How can I make the text below the image when using flexbox?

Sehagic How to make the text fall below the image. I know that if you use dispaly:inline-block, you can use float:left or float:right. But I'm new to using flexbox, someone out there who knows more about it can help me out with this. big-row { display: flex;

How can I make the borders overlap?

Daniel Chu I'm trying to have the header's border top have one color, and when the nav is hovered/activated, part of it changes to another color. and why is my li:hovertab border-topstill returning me border-bottom? What I'm trying to achieve in the picture As

How can I make the alerts overlap?

New to StackOverflow RE:http : //twitter.github.io/bootstrap/components.html#alerts I want to show these alerts at the top of the page. However, whenever it does, it pushes down what's under it. I don't want it to just overlap (meaning, it appears on top, but

How can I make the keyboard overlap the component?

Silva The yellow component is a tabBar that should be pinned to the bar and the keyboard should cover it when opened. The red component should rise without reducing its height. Already tried the KeyboardAvoidingView component but it doesn't work. But I think I

How can I make the toolbars not overlap?

Tlaloc-ES I'm trying to add a list in main but the toolbar is covered so that the first element is not visible during execution. any solution main layout <android.support.design.widget.AppBarLayout android:layout_width="match_parent" androi

How can I make the borders overlap?

Daniel Chu I'm trying to have the header's border top have one color, and when the nav is hovered/activated, part of it changes to another color. and why is my li:hovertab border-topstill returning me border-bottom? What I'm trying to achieve in the picture As

How can I make the borders overlap?

Daniel Chu I'm trying to have the header's border top have one color, and when the nav is hovered/activated, part of it changes to another color. and why is my li:hovertab border-topstill returning me border-bottom? What I'm trying to achieve in the picture As

How can I make the borders overlap?

Daniel Chu I'm trying to have the header's border top have one color, and when the nav is hovered/activated, part of it changes to another color. and why is my li:hovertab border-topstill returning me border-bottom? What I'm trying to achieve in the picture As

How can I make the keyboard overlap the component?

Silva The yellow component is a tabBar that should be pinned to the bar and the keyboard should cover it when opened. The red component should rise without reducing its height. Already tried the KeyboardAvoidingView component but it doesn't work. But I think I

How can I make the keyboard overlap the component?

Silva The yellow component is a tabBar that should be pinned to the bar and the keyboard should cover it when opened. The red component should rise without reducing its height. Already tried the KeyboardAvoidingView component but it doesn't work. But I think I

How can I make the borders overlap?

Daniel Chu I'm trying to have the header's border top have one color, and when the nav is hovered/activated, part of it changes to another color. and why is my li:hovertab border-topstill returning me border-bottom? What I'm trying to achieve in the picture As

How can I make the borders overlap?

Daniel Chu I'm trying to have the header's border top have one color, and when the nav is hovered/activated, part of it changes to another color. and why is my li:hovertab border-topstill returning me border-bottom? What I'm trying to achieve in the picture As

How can I make the keyboard overlap the component?

Silva The yellow component is a tabBar that should be pinned to the bar and the keyboard should cover it when opened. The red component should rise without reducing its height. Already tried the KeyboardAvoidingView component but it doesn't work. But I think I

How can I make the keyboard overlap the component?

Silva The yellow component is a tabBar that should be pinned to the bar and the keyboard should cover it when opened. The red component should rise without reducing its height. Already tried the KeyboardAvoidingView component but it doesn't work. But I think I

How can I make the sidebar overlap the header?

tone I tried using z-index to make the sidebar overlap the header, but couldn't do it. header { width: 100%; height: 50px; background-color: blue; z-index: 0; } aside { height: 100vh; width: 300px; background-color: green; z-index: 200; } <bod