max-width doesn’t set the width of the image, it sets the max width it is allowed to resize to.
width: 100%; to set the width of your image to 100% of it’s space.
border: 1px solid black;
I have tried several things, ultimately what should work to allow the graphic to display at full image size is this:
It’s not working. It will only display the .custom-logo at 225 x 225 for whatever reason and I cannot seem to override the WP template. I’m not a PHP expert, but from what I can tell from inspecting the image, it seems to have something to do with the template PHP code. Here is the code that is displaying the logo. Any thoughts to allow the image to display at full size would be helpful! Clearly there’s something I’m missing.
<?php has_custom_logo() ? the_custom_logo() : ''; ?>
<?php if ( is_front_page() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) : ?>
<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
No, the fault is not going to lie with PHP. What are the dimensions of the raw logo image file? What are the dimensions of the space available to it? Can you link us to an example of your page so we can take a look?
@ceejayoz It’s a CSS issue, check my anaswer. Why would the raw image size matter to CSS? It can be resized just the same as anything else.
@ceejayoz You’re right, disregard me lmao, totally misunderstood what you were saying. Also not sure why I can’t type today.
@JoshuaTanner Could you please create a reproducible issue with just html and css? The way the image displays on the screen has absolutely nothing to do with PHP. Please copy the HTML and CSS generating this issue so we can see what’s going on.