0

I have a 2 Side-Cover which has an image side an Title Side. And i want to make the Title Side move over Image Side when screen Resizes! something like this site Cover NKWindows

Thanks for Helping

1 Answers1

0

You can use something like this. Place the cover as the container's background and then place the content inside the #title div. That way, when the screen gets smaller, the background will remain untouched and the right-hand content will seem to move over it.

#cover {
  background-image: url(http://www.nkwindows.co.nz/assets/HomeSlides/nk-windows-02.jpg);
  background-repeat: no-repeat;
  width: 100%;
  overflow: auto;
  position: relative;
  height: 180px;
}
#title {
  float: right;
  font-size: 40px;
  padding: 10px;
  margin: 0;
  width: 250px;
  background-color: #E2231A;
  color: #fff;
  height: 180px;
  box-sizing: border-box;
}
<div id="cover">
  <div id="title">This is the
    <br />moving title</div>
</div>
imelgrat
  • 2,407
  • 1
  • 12
  • 17