Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to remove blanks in my slider ( Trying full screen slider )

sorry for the this basic question. I am new on front-end. And triying create a responsive portfolio site. And this is my problem actually I am trying full screen slider. How can I remove blanks and How can I do full stretch screen slider. My idea full screen background slider. Any code for remove or strech for images . Any idea for this ?

HTML CSS JSResult Skip Results Iframe * {
  margin: 0;
  box-sizing: border-box;
}


/* JS */

slider>content {
  display: none
}


/* Content General */

slider {
  background-color: #9e9e9e;
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
}


/* Content */

slider .contents {
  overflow: hidden;
  height: 100%;
  width: 100%;
  position: relative;
  background-size: cover;
  transition: all .5s ease;
}

slider content {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  display: block;
  transform: translate(100%, 0);
}

slider content:nth-of-type(1) {
  transform: translate(0%, 0);
}


/* Arrows */

slider .ArrowLeft,
slider .ArrowRight {
  position: absolute;
  height: 100%;
  width: 2em;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

slider .ArrowLeft {
  left: 0px;
}

slider .ArrowRight {
  right: 0px;
}


/* Selector */

slider .Selectores {
  padding: 40px;
  position: absolute;
  bottom: -1.5em;
  gap: 10px;
  display: flex;
  justify-content: space-between;
}

slider .Selectores>div {
  background-color: #000;
  height: 10px;
  width: 10px;
  display: block;
  border-radius: 5px;
  cursor: pointer;
}

slider .Selectores>div.Activo {
  background-color: #999999;
}
<body>
    <slider arrows="true" selec="true" autoplay="4">
      <content style="background-image: url(https://unsplash.it/500/300/)"></content>
      <content style="background-image: url(https://unsplash.it/501/301/)"></content>
      <content style="background-image: url(https://unsplash.it/502/302/)"></content>
    </slider>
  
  <script src="./script.js"></script>
</body>

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

There is a css reset you can add to the body tag.

/* ADD THIS CSS RESET */
body {
  padding: 0;
  margin: 0;
  overflow: hidden
}

HTML CSS JSResult Skip Results Iframe * {
  margin: 0;
  box-sizing: border-box;
}


/* JS */

slider>content {
  display: none
}


/* Content General */

slider {
  background-color: #9e9e9e;
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
}


/* Content */

slider .contents {
  overflow: hidden;
  height: 100%;
  width: 100%;
  position: relative;
  background-size: cover;
  transition: all .5s ease;
}

slider content {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  display: block;
  transform: translate(100%, 0);
}

slider content:nth-of-type(1) {
  transform: translate(0%, 0);
}


/* Arrows */

slider .ArrowLeft,
slider .ArrowRight {
  position: absolute;
  height: 100%;
  width: 2em;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

slider .ArrowLeft {
  left: 0px;
}

slider .ArrowRight {
  right: 0px;
}


/* Selector */

slider .Selectores {
  padding: 40px;
  position: absolute;
  bottom: -1.5em;
  gap: 10px;
  display: flex;
  justify-content: space-between;
}

slider .Selectores>div {
  background-color: #000;
  height: 10px;
  width: 10px;
  display: block;
  border-radius: 5px;
  cursor: pointer;
}

slider .Selectores>div.Activo {
  background-color: #999999;
}
<body>
    <slider arrows="true" selec="true" autoplay="4">
      <content style="background-image: url(https://unsplash.it/500/300/)"></content>
      <content style="background-image: url(https://unsplash.it/501/301/)"></content>
      <content style="background-image: url(https://unsplash.it/502/302/)"></content>
    </slider>
  
  <script src="./script.js"></script>
</body>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading