I administrative a site where there is a logo which is left aligned.
The HTML and CSS for that logo is looking like this:
HTML
<div class="logo-container">
<a href="@homePage.Url">
<img src="/img/logo-white.svg" data-svg-fallback="/img/logo-white.png" alt="@logoAltText" class="img-responsive logo"/>
</a>
</div>
CSS
@mixin img-responsive($display: block) {
display: $display;
max-width: 100%; // Part 1: Set a maximum relative to the parent
height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
}
I have to make a Landingpage where the logo is centered. Therefore I thought on my landingpage I could do like so:
HTML
<div class="logo-container">
<a href="@homePage.Url">
<img src="/img/logo-white.svg" data-svg-fallback="/img/logo-white.png" alt="@logoAltText" class="landingpage img-responsive logo"/>
</a>
</div>
CSS
.landingpage img-responsive logo {
margin: 0 auto;
}
is that incorrect?