Hi there folks, I need some help from you CSS ninja
I need to build and clone a navbar from scratch using HTML and CSS only, it is simple but because I have been using Bootstrap for almost everything in the past, now I find it a bit tricky when using only pure vanilla CSS.
I have done the HTML and parts of the CSS and basically, my question is regarding the positioning and best practice and how to make it responsive and fluid, as I have been trying to make it look exactly the same as the one in the picture but I can not get it right until now even when Googling and looking at Stack Overflow.
Here is the navbar Image:
And here is my HTML and CSS:
<header className='App-header'>
<nav>
<img src={logo} className='App-logo' alt='logo' />
<ul className="menu">
<li className='politics'>
<a href='#'>POLITICS</a>
</li>
<li className='business'>
<a href='#'>BUSINESS</a>
</li>
<li className='tech'>
<a href='#'>TECH</a>
</li>
<li className='science'>
<a href='#'>SCIENCE</a>
</li>
<li className='sports'>
<a href='#'>SPORTS</a>
</li>
</ul>
</nav>
</header>
@import url('https://fonts.googleapis.com/css?family=Lato&display=swap');
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,400i&display=swap');
html,
body {
background-color: white;
margin: 0;
padding: 0;
}
/* navbar */
nav {
background-color: #ffffff;
font-family: Lato-Regular;
font-size: 14px;
color: #3e433e;
border-bottom: 1px solid #979797;
list-style: none;
text-align: ;
width: 1400px;
height: 56px;
}
img {
height: 45px;
margin-top: 7px;
margin-left: 131px;
}
ul {
display: inline-block;
text-align: right;
}
nav > ul > li {
display: inline-block;
padding-right: 29px;
margin-top: 20px;
margin-bottom: 19px;
}
nav > ul > li > a {
text-decoration: none;
color: #3e433e;
}
nav > ul .politics a:hover {
color: #ff001f;
}
nav > ul .business a:hover {
color: #bd10e0;
}
nav > ul .tech a:hover {
color: #4990e2;
}
nav > ul .science a:hover {
color: #7cbc37;
}
nav > ul .sports a:hover {
color: #f6a623;
}
So what I am doing wrong and how I can fix the CSS to make it look exactly the same responsive and fluid, and how I can improve my code?