Hi I want to achieve the following result in my React Component with Bootstrap:
but instead this is what I see (lines are for reference to know where the columns end:
Why the elements in columns are not entered even if I set it to be so and why when I hover over the text the icons move to the left? Do you happen to know how to fix it? Maybe I don’y know something important about Bootstrap in react.
Below, please find my component
import React from 'react';
import { Container, Row, Col} from 'react-bootstrap';
import { faAddressCard, faGraduationCap,faKeyboard, faGlobe, faTasks, faEnvelopeOpen} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import './Styles.css'
function Navigation()
{
return(
<Container fluid className="navigation_page">
<h3 className="style_h3">Discover me!</h3>
<Row>
<Col className="d-flex justify-content-center test">
<div><a href="#about" className="link_style"><FontAwesomeIcon icon={faAddressCard} className="icon_style"></FontAwesomeIcon><h4 className="style_h4">About me</h4></a></div>
</Col>
<Col className="d-flex justify-content-center test">
<div><a href="#about" className="link_style"><FontAwesomeIcon icon={faGraduationCap} className="icon_style"></FontAwesomeIcon><h4 className="style_h4">Education</h4></a></div>
</Col>
<Col className="d-flex justify-content-center test">
<div><a href="#about" className="link_style"><FontAwesomeIcon icon={faKeyboard} className="icon_style"></FontAwesomeIcon><h4 className="style_h4">Skills & Technologies</h4></a></div>
</Col>
</Row>
<Row>
<Col className="d-flex justify-content-center test">
<div><a href="#about" className="link_style"><FontAwesomeIcon icon={faGlobe} className="icon_style"></FontAwesomeIcon><h4 className="style_h4">Foreign languages</h4></a></div>
</Col>
<Col className="d-flex justify-content-center test">
<div><a href="#about" className="link_style"><FontAwesomeIcon icon={faTasks} className="icon_style"></FontAwesomeIcon><h4 className="style_h4">Projects</h4></a></div>
</Col>
<Col className="d-flex justify-content-center test">
<div><a href="#about" className="link_style"><FontAwesomeIcon icon={faEnvelopeOpen} className="icon_style"></FontAwesomeIcon><h4 className="style_h4">Contact</h4></a></div>
</Col>
</Row>
</Container>
)
}
export default Navigation
and CSS that I added:
/*NAVIGATION PAGE SET UP - NAVIGATION.JS */
.navigation_page{
width: 100vw;
text-align: center;
justify-content: center;
}
.row_style{
justify-content: center;
display: flex;
text-align: center;
justify-content: center;
}
.test{
border: 1px solid red;
height: 200px;
}
.style_h3{
font-size: 80px;
text-transform: uppercase;
letter-spacing: 7px;
text-shadow: 4px 4px 4px #6666ff;
color: #b3b3ff;
text-align: center;
}
.style_h4{
font-size: 35px;
border-left: 5px solid #6699ff ;
border-right: 5px solid #6699ff ;
border-radius: 8px;
padding:10px;
}
.icon_style{
font-size: 100px;
display: block;
color:#e6e6e6;
background: linear-gradient(to left, #9966ff, #9999ff, #6666ff, #9966ff);
padding:15px;
border-radius: 8px;
width:380px;
height:110px;
}
.link_style{
text-decoration: none;
color: #666666;
}
.link_style:hover{
text-decoration: none;
color: #666666;
}
.style_h4:hover
{
background-color: #b3ccff;
width: 320px;
letter-spacing: 2px;
text-decoration: none;
}