Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can i increase the size of an icon and separate them from one another in a single line

these 3 icon is close to each other, I want to increase the size of these 3 icon, and separate them from each other. is there anybody who can show me how to do this in a single line using css3?, I’m using Bootstrap5 and Google Icons.

<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
  rel="stylesheet">

html code:

<div class="container">
    <div class="row">

        <div class="col d-flex justify-content-center">
            <a href="{% url 'notification' %}" style="text-decoration: none;">
                <span class="material-icons">notifications</span>
                {% if unread_notifications %}
                <span class="badge bg-secondary">{{unread_notifications}}</span>
                {% endif %}
            </a>
            <a href="{% url 'Profile' user.id %}">
                <span class="material-icons">person</span>
            </a>

            <a href="{% url 'Profile' user.id %}">
                <span class="material-icons">logout</span>
            </a>
        </div>
    </div>
</div>  

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

For the Item distances you can achieve this using gap: gapValue css property. It sets the gap between flex-items. Just make your <a> display property to block as well.

For the Icon sizes, since you’re using a font, you can change their size using font-size: yourDesiredValue

.row .col {
  gap: 20px; /* Change this to your desired space */
}

.row .col a{
  display: block;
}

.row .col .material-icons{
  font-size: 28px;
}
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
  rel="stylesheet">
 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">

<div class="container">
    <div class="row">
        <div class="col d-flex justify-content-center">
            <a href="">
                <span class="material-icons">notifications</span>
            </a>
            <a href="">
                <span class="material-icons">person</span>
            </a>
            <a href="">
                <span class="material-icons">logout</span>
            </a>
        </div>
    </div>
</div>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading