Here is my React code. I have two components: BlackBox and SomeText. I want the BlackBox to be full screen and the SomeText to be below it. I would assume that two divs in a row would render in order (either next to each other or below one another, but BlackBox in this example is completely on top of the SomeText).
class BlackBox extends React.Component {
render() {
return (<div id="blackbox"></div>);
}
}
class SomeText extends React.Component {
render() {
return(<div id="sometext">Hello</div>);
}
}
class App extends React.Component {
render() {
return(
<div>
<BlackBox/>
<SomeText/>
</div>
);
}
}
Here is the CSS code to make the BlackBox full screen:
#blackbox {
background-color: #00000;
height: 100%;
width: 100%;
left: 0;
top: 0;
position: absolute;
}
Why does the BlackBox cover the SomeText?