SVG is inline by default. Add display: block to it and then margin: auto will work as expected.
Related Posts:
- Adding border to SVG image
- How to get these two divs side-by-side?
- What does auto do in margin: 0 auto?
- Does bootstrap have builtin padding and margin classes?
- How to change the color of an svg element?
- SVG Fill Color Not Working
- What’s the difference between align-content and align-items?
- sizing div based on window width
- How can I fill a div with an image while keeping it proportional?
- Using margin / padding to space span tag from the rest of the p tag
- Can you change the color of svg icons to the global color I choose from WordPress
- When to use margin vs padding in CSS [closed]
- Making a
- CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page
- What is the difference between the selectors “.class.class” and “.class .class”?
- How to implement max-font-size?
- @Media min-width & max-width
- How do I center this form in css?
- How can I replace text with CSS?
- Bootstrap 4, How do I center-align a button?
- How do I horizontally center a span element inside a div
- Is background-color:none valid CSS?
- Float a div above page content
- What does an asterisk (*) do in a CSS selector?
- Why does this CSS margin-top style not work?
- height style property doesn’t work in div elements
- Text not wrapping inside a div element
- How to make padding:auto work in CSS?
- How to vertically center inside the parent element with CSS?
- How can I horizontally align my divs?
- background-size: cover not working?
- combined multiple classes into one css rule
- CSS Outside Border
- CSS not working in Chrome
- Pure CSS to make font-size responsive based on dynamic amount of characters
- CSS – display: none; not working
- Is there an opposite to display:none?
- Rainbow gradient on text in CSS
- CSS3 opacity gradient?
- SVG drop shadow using css3
- use multiple css filters at the same time?
- font-weight is not working properly?
- What would be the best method to code heading/title for ul or ol, Like we have caption in table?
- CSS “and” and “or”
- Removing whitespace between HTML elements when using line breaks
- Why are my divs overlapping?
- Child themes CSS priority problems without using !important
- Cache busting CSS files other than style.css
- How do I add a search bar to my header?
- Sanitize User Entered CSS
- How can I test how fast or slow my wordpress website it?
- How to work with custom styles saved in theme option?
- Modernizr and WordPress – How can I add a CSS class to the html element?
- Stylesheet switching and caching
- front-page.php stylesheet
- How to Add Admin Bar and Admin Menu or Submenu Notification Bubbles?
- Check and dequeue if multiple stylesheets exists using wp_style_is?
- How to Edit the Order of Global Colors in Elementor? [closed]
- WordPress Displaying Thumbnails Vertically
- plugin css is not being applied to the page?
- Why do WordPress default themes specify fonts in so many places?
- How do I make Div Container 100% width only on homepage of site?
- WordPress & W3C CSS Validation
- CSS in child theme not getting loaded
- CSS ?ver=4.6.1 not updating
- TwentyTwelve versioning
- How to highlight all current categories when viewing a single post?
- Changing Font-Size based on specific Font thru javascript
- How to get child style.css to load last rather than second behind parent style.css?
- Duplicate attribute class causing site validation error
- Assets in css dont link properly in pages other than home
- Do I have to use a WordPress specific CSS reset, or is a normal, Eric Meyer style CSS reset fine?
- Relative file paths in CSS when linking directly (not enqueuing)
- Remove Genericons Helper CSS from twentyfourteen theme
- How do I style WordPress pages differently based on the tag used?
- How/where to add additional stylesheet to WP
- How the Css File is Linked without calling it in header.php?
- How to make Custom Walker for wp_nav_menu() for materialize framework
- Use stylesheet from a different location
- Is there a filter for editor-style.css file?
- Custom CSS class or ID on menu items that have a Submenu
- Show enqueued CSS and Script in custom header
- How to insert html/css/javascript code to wordpress plugin
- Different ways to load child theme css
- Importing changes to Child Theme
- Can you edit WP gutenberg block css without a plugin?
- Style internal links based on the tags of the linked post
- How to override Bootstrap css with my child theme css in wordpress?
- How to stop Gutenberg from outputting inline CSS for specific blocks?
- Save changes in CSS after removing Menu from specific page
- Move the position of menu item [closed]
- Pure CSS to “float” to the right the number of children of an admin_bar child node
- “Scattered” gallery
- WordPress adding inline style can’t remove it
- How to enable table overflow scroll? (especially order list table)
- WordPress custom CSS file overrided by internal CSS [closed]
- Using categories on navigation bar instead of pages
- How do I hide a specific div class inside ? [closed]
- How do I change search input padding for blockbase child theme?
- WordPress: one page’s content is not centered, other pages all look the same [closed]