0

Hello my software developer friends.

<!DOCTYPE html>
<html>
<head>


<title>PostmodernCast</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">


</head>
<body>

<i class="fab fa-accessible-icon"></i>

</body>
</html>

How can I format the fab fa-accessible-icon content here with css. Because

.fab fa-accessible-icon{ width:100px; border-radius:100px}

it's not like

Sfili_81
  • 2,377
  • 8
  • 27
  • 36
jetiin
  • 13
  • 2

1 Answers1

1

to make changes to the fontawesome icon first you should select it right. starting by the i tag and followed by the class of the icon you want to make changes to. Now, this code works.

 i.fa-accessible-icon { 
     width:100px;
     border-radius:100px;  
     font-size: 1.5rem
    }

example

i.fa-accessible-icon {
  width: 100px;
  border-radius: 100px;
  font-size: 3.5rem;
  padding-left: 15px;
  background-color: blue;
  color:red;
}
<!-- fontawesome-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog==" crossorigin="anonymous" />


<i class="fab fa-accessible-icon"></i>
Ahmad Dalao
  • 1,968
  • 1
  • 8
  • 14
  • Suppose there is an element `
    ` and you need to apply CSS to it. How can we select that element? `div.new{ } ` or simply `.new{ }`? Which is better?
    – Subrato Pattanaik Sep 21 '20 at 09:29
  • 1
    both are correct but both at the same time have different levels of specificity. But in this case, I would use `.new ` But in a cause that requires me to be more specific, I would use the `div.new`. So it actually depends on the situation. – Ahmad Dalao Sep 21 '20 at 09:35