This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

SVG as logo setting height and width with css

10 years ago · Last reply by Support Assistants 10 years ago

On my dev site https://wp-bullet.com I’m having issues setting the height of my logo with css (I hoped to find it in this thread but it wasn’t shared). I did try this but it didn’t work.

The logo is https://wp-bullet.com/wp-content/uploads/2016/01/wp-bullet-svg-test.svg

I have tried

.a.logo {
  height: 71px;
  width: 300px;
}

and this

a.logo .logo-height-constrain {
  height: 71px;
  width: 300px;
}

I’d also like to set a png fallback as mentioned here, any idea how to do that?

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

2
  1. blindpet 10 years, 1 month ago

    Funnily enough I fixed this immediately afterwards, the correct css for choosing svg size in vantage theme is this

    .logo .logo-height-constrain {
      height: 71px;
      width: 300px;
    }

    I’d still like to know how to do the png fallback :)

  2. Support Assistants 10 years, 1 month ago

    Awesome :) Glad to hear you’ve made progress. By default WP doesn’t have SVG support. I’d imagine a PNG fallback would take a child theme and custom development. It’s a bit beyond our normal support offering on the forums.

    Here is a starting point if this is something you want to look into:

    https://wordpress.org/support/topic/how-to-use-svg-logo-with-png-fallback

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread