I have an issue, the issue is the following; I have sidebar.js which should be position at the top right but the navbar.js is filling the page at the top with Header.js. But all the set are in stylesheet and content should be in the middle to be fit for logic and image(set to on the left must fit with correct size to allow for content and header be equal and sidebar to fit together as one fitted web page).
The goal i want all of these to fit together and sidebar be as a card so can populate my rest api inside, hope make sense.
What I have tried:
<pre lang="Javascript">
* {
box-sizing: border-box;
}
body {
font-family: Arial, Roboto, sans-serif;
margin: 0;
}
.header {
padding: 80px;
text-align: center;
background: #269faf;
color: white;
}
.header h1 {
font-size: 40px;
}
.navbar {
overflow: hidden;
background-color: #FF6600;
}
.navbar a {
float: left;
display: block;
color: white;
text-align: center;
padding: 14px 15px;
text-decoration: none;
}
.navbar a.right {
float: right;
}
.navbar a:hover {
background-color: #FF6600;
color: orangered;
}
.row {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.side {
-ms-flex: 30%;
flex: 30%;
background-color: #f1f1f1;
padding: 20px;
}
.main {
-ms-flex: 70%;
flex: 70%;
background-color: white;
padding: 20px;
}
.footer {
padding: 20px;
text-align: center;
background: #ddd;
}
.on-time-delivery-g {
color: #FF6600;
font-family: Roboto;
font-size: 14px;
line-height: 16px;
text-align: left;
}
.free-shipping-up {
color: #FF6600;
font-family: Roboto;
font-size: 14px;
line-height: 16px;
text-align: left;
}
.logo {
width: 46px;
height: 40px;
}
//Header.js
import React, { Component } from 'react';
class Header extends Component {
render() {
return (
<div className="header">
</div>
);
}
}
export default Header
//Content.js
import React, { Component } from 'react';
class Content extends Component {
render() {
return (
<div className="main">
<img alt="expo" src={require('./images/drone_image.png')} className="left"/>
</div>
);
}
}
export default Content
//Sidebar.js
import React, { Component } from 'react';
class Sidebar extends Component {
render() {
return (
<div className="side">
</div>
);
}
}
export default Sidebar