Archived topic
Logo width and height
3 replies · Started by Angelo on July 25, 2021
As per the discussion in:
https://generatepress.com/forums/topic/set-an-explicit-width-and-height-on-image-elements-to-reduce-layout-shifts-2/#post-1869933
I want to set a fixed height and width for the logo
I set the width at 300px in
customize – site identity – logo width
but inspecting the element
shows as:
height: auto;
max-width: 100%;
How do I set the logo width and height?
If you inspect the <img> element you will see this CSS is being applied:
.site-header .header-image {
width: 300px;
}
However the logo is missing the width and height attributes.
Go to Customizer > General and change the Structure to Flexbox - this should ensure those attributes are added.
that did it. Thanks
Glad to hear that