0

I have an anchor element, inside a div, and it can't be resized or moved up or down and when I add padding to it, it just covers his sibling element, I tried using trasnfrom-translate, margin, and nothing happened.

enter image description here

HTML-Code:

<div class="medio-item">
     <img src="../assets/mail.svg" class="icon" alt="Email">
     <div class="medio-item-text">
          <h3>Escribenos a:</h3>
          <a href="mailto:holafestival@toursfestival.com">holafestival@toursfestival.com </a>
     </div>
</div>

CSS-Code:

.contacto-medio {
    margin: 5rem 0;
    .contacto-medio-online {
        display: inline-block;
        width: 46rem;
        height: 42rem;
        background-color: #f87408cc;
        @include WidthAuto;
        .medio-item {
            display: flex;
        }
    }
}

.medio-item-text {
    color: white;
    h3 {
        font-size: 1.6rem;
        font-weight: 700;
    }
    a {
        color: black;
        background-color: white;
        border-radius: 5px;
        padding: 1rem;
        margin: 0;
    }
}

the CSS is SCSS

Shadi Farzankia
  • 639
  • 8
  • 21

1 Answers1

2

I think the problem is because of the display flex for medio-item. add flex-direction: column and check the result:

.medio-item {
   display: flex;
   flex-direction: column;
}
Shadi Farzankia
  • 639
  • 8
  • 21