How I fix css or code from my website logo so it always keeps the original size of width and height

Asked

Viewed 45 times

0

added css:

nav-brand-sitelogo {
    height: 91px!important;  
    width: 300px!important;
}

element.style {
  height: 91px!important;  
    width: 300px!important;
}

.can-shrink-brand.sticky-brand-shrink-on .desktop-sticky .navbar-brand img {
height: 91px!important;
width: 300px!important; 
 }

But when I publish it doesn’t update the logo to be the same height, at the time I go down with the scroll bar it gives a distorted

<img src="https://mdwebdesign.tk/wp-content/uploads/2018/07/mdlogopng.png" alt="Voltar para a página inicial" class="" width="300" height="91" style="max-width:250px;max-height:100px" data-no-retina="" data-czr-model_id="logo" data-czr-template="templates/parts/header/parts/logo">

I think it’s this max witdh and max-heght, but I’ve set everything to 300 x 91 I don’t know how to fix Thank you

1 answer

2


Your problem may be pq vc has a class with a higher hierarchy defining the maximum height as 30px.

Another point is that:

The properties min-height and max-height overlap with height.

As you can read in this Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/CSS/height

Adjust your CSS here:

.can-shrink-brand.sticky-brand-shrink-on .desktop-sticky .navbar-brand img {
    max-height: 30px!important; /* mude a altura aqui*/
    width: auto!important;
}

inserir a descrição da imagem aqui


TIP: You can read about the hierarchy and priority of classes here on this question: Which css selector has priority?

  • Okay, thanks

  • @matheusdouradobr cool that worked out there! If my answer has helped you in any way consider marking it as Accept, in this icon below the arrows on the left side of the answer if you think it has helped solve the problem. So the site does not get its open question pending no answer accepted even though it has already been resolved. []s

Browser other questions tagged

You are not signed in. Login or sign up in order to post.