I have a relatively simple React component that I'm working on. Even though I am quite new to React, I have tried various methods to eliminate the white space issue but so far have been unsuccessful in determining what is causing it. Negative margin seems to be a temporary fix, but I understand that it's not the best solution. Can someone please provide guidance on how to resolve this?
import React, { Component } from 'react';
class Shopdetail extends Component{
constructor(props){
super(props);
this.state={
data: this.props.data,
redirect:false
};
}
componentDidMount(){
console.log(this.props.match.params.idUser);
}
render(){
return(
<div style={{ verticalAlign: 'top',margin:'0',clear:'both'}}>
<div style={{background:'#cc5',width:'100%',height:'100px',verticalAlign: 'top',boxSizing: 'border-box',clear:'both',padding:'0'}}>Hey</div>
</div>
)
}
}
export default Shopdetail
Here is a screenshot for reference: https://i.sstatic.net/eZFTa.png