Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

172
Vistas
to put border-pixel and border-radius around images

I try to create a container which hold a div with image but around image I should to create another element border: 1px solid #C7B273; in four party:

top, bottom, left, right and give another property necessary for border px around image.

Image has border-radius:0; By the UI/UX I understand that border: 1px solid #C7B273; should to stay margin-bottom after picture.

I try to do this:

img {
    border: 1px solid #999;
    border-radius: 10px;
    padding: 15px;
    position: absolute;
    margin-left: auto;
    margin-right: auto;
    display: block;
    z-index: 10;
}
<div class="border">
    <img src="./images/about.jpg" width="200px" height="256px" alt="Nature">
</div>

And get this results:

enter image description here

But result final should be like image:

enter image description here

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Something like that?

.w {
  height: 256px;
  width: 200px;
  position: absolute;
  border: 1px solid #999;
  border-radius: 10px;
}     
img {
  padding: 15px;
  position: absolute;
  margin-left: auto;
  margin-right: auto;
  display: block;
  z-index: 10;
}
    <div class="border">
      <div class="w"></div>
        <img src="https://via.placeholder.com/900/gray" width="200px" height="256px" alt="Nature">
    </div>

about 4 years ago · Juan Pablo Isaza Denunciar

0

     
.border {
  height: 256px;
  width: 200px;
  position: relative;
} 
.image {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

.div {
  content: "";
  border: 1px solid #C7B273;
  border-radius: 10px;
  position: absolute;
  width: 95%;
  height: 95%;
  bottom: -10px;
  left: -10px;
z-index: -1
}
  <div class="border">
  <img
  class="image"
  src="https://placeimg.com/200/256/nature"
  width="200px"
  height="256px"
  alt="Nature"
  />
  <div class="div"></div>
  </div>

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda