• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How to align svg icon inside a button in HTML/CSS?

Resolved: How to align svg icon inside a button in HTML/CSS?

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I am trying to put the svg icon inside the faq button. Can i use only flex box to align the icon inside the button?
This is my output: This is my output:
And this what i want to achieve: And this what i want to achieve
This is some of my css:
And this is the HTML:

Answer:

Remove the fill property from the SVG icon and also make the button and SVG background transparent. In-display flex you can achieve this result by justify-content:space-between;




If you have better answer, please add a comment about this, thank you!

css flexbox html layout
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: I am facing ERR_HTTP2_PROTOCOL_ERROR on my website

27/03/2023

Resolved: TypeScript does not recognize properties when instantiating interface array

27/03/2023

Resolved: How to make statement case insensitive when uploading a dta file with specified columns?

27/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.