Home > Software engineering >  icon are not showing in font awesome html
icon are not showing in font awesome html

Time:03-18

I was working was HTML5 and CSS for making a personal portfolio website and I needed to use font awesome icons. some of them work but other not I tried every thing possible I googled it and I watched YouTube tutorials and I searched on stack over flow and all of them were useless so can any body help me

this is the full Css file and html file

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
:root{
    --color-dark-blue:#0C2D48;
    --color-white-blue:#B1D4E0;
    --color-light-blue:#2E8BC0;
    --color-mid-blue:#145DA0;
    --color-purple-blue:#c0c1c2;
    
    
}
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;     
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}
header{
    background-color:#f0f0f0;
    width: 100%;
    position: fixed;
    z-index: 15;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 200px;
}
.logo-txt{
    text-decoration: none;
    font-size: 1.8em;
    color: #3a6cf4;
    text-transform: uppercase;
    font-weight: 700;
}
.navigation a{
    text-decoration: none;
    color: #3a6cf4;
    font-size: 1.1em;
    font-weight: 500;
    padding-left: 30px;
}
.navigation a:hover{
    color: #0b41d4;
    font-weight: 600;
}
section{
    padding: 100px 200px;
}
.main-sec{
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: url("images/test15.png") no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.main-sec h2{
    color: #4e9eff;
    font-size: 3.5em;
    font-weight: 600;
}
.main-sec h3{
    color: var(--color-purple-blue);
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 10px;
    margin-bottom: 30px;
}
.main-btn{
    color: white;
    background-color: #3a6cf4;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
    display: inline-block;
    padding: 0.937em 2.187em;
    letter-spacing: 1px;
    border-radius: 15px;
    margin-bottom: 40px;
    transition: 0.7s ease;
}
.main-btn:hover{
    background-color: #0a49f6;
    transform: scale(1.1);
}
.social-icons a{
    color: white;
    font-size: 1.7em;
    padding-right: 30px;
}
.title{
    display: flex;
    justify-content:center ;
    color:#0a49f6 ;
    font-size: 2.2em;
    font-weight: 800;
    margin-bottom: 30px;
}
.content{
    display: flex;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;

}
.card{
    background-color: white;
    width: 21.5em;
    box-shadow: 0 5px 25px rgba(1, 1, 1, 15%);
    border-radius: 10px;
    padding: 25px;
    margin: 15px;
}
.card:hover{
    transform: scale(1.1);
    transition: 0.7s ease;
}
.icon{
    color: #3a6cf4;
    font-size: 8em;
    text-align: center;
}
.info{
    text-align: center;
}

.info h3{
    color: #3a6cf4;
    font-size: 1.2em;
    font-weight: 700;
    margin: 10px;
}

 
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ABF</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.0/css/all.min.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <header>
        <a href="#" >abf</a>
        <nav >
            <a href="#" >services</a>
            <a href="#" >projects</a>
            <a href="#" >contact</a>
        </nav>
    </header>
    
    <section >
        <div>
            <h2>Web devoloper</h2>
            <h3>I build front end websites</h3>
            <a href="#projects" >View my work</a>
            <div >
                <a href="#"><i ></i></a>
                <a href="#"><i ></i></a>
                <a href="#"><i ></i></a>
                <a href="#"><i ></i></a>
            </div>
        </div>
    </section>v         

    <sectionn  id="services">
        <h2 >services</h2>
        <div >
            <div >
                <div >

                    <i ></i>
                </div>
                <div >
                    <h3>front-end</h3>
                    <p>
                        making proffesional front-end structure for
                        websites with different topics
                        using html and css
                    </p>
                </div>
                
            </div>
            <div >
                <div >

                    <i ></i> 
                    
                </div>
                <div >
                    <h3>motion graphic</h3>
                    <p>
                        making proffesional motion graphic
                        videos using illustrator and after
                        effects
                    </p>
                </div>
                
            </div>

            <div >
                <div >

                    <i ></i>
                </div>
                <div >
                    <h3>photo design</h3>
                    <p>
                        making proffesional advertising desings
                        using illustrator and photoshop
                    </p>
                </div>
                
            </div>
        </div>

    </section>
</body>
</html>

CodePudding user response:

.social-icons{
  color:white
}

The icons are there, they're just white-on-white.

CodePudding user response:

The problem in connected lib, i think u need write for fa about this bug. Try this lib for fix problem https://site-assets.fontawesome.com/releases/v6.1.0/css/all.css

  • Related