loading

How to give space between icons and text in CSS

To give space between icons and text, add a margin on the icon or text.

Example- I want to add space between Facebook font awesome icon and Facebook text. You can add the following CSS to add space between the icon and text.

<ul>
<li><i class="fa fa-facebook"/>facebook</li>
</ul>

<style>
.fa.facebook{display:inline-block;margin-right:10px}
</style>

Loading...

About Author

Loading...

Loading...

👨‍💻

Frontend development

Learn frontend development with examples and practical exercise of HTML,CSS,JS,React.js.