I'm React Beginner, i have two questions, first question: here i'm using 'allotment' to split two images (resize), you can change the size of images by pulling from middle of those two images
my problem here is, when i'm pulling to left or right to see whole picture, it does not show whole picture it goes over the bottom of page, any idea why?
Second question: below the images I have div which shows with height:
93%`
my question is why height:93
shows the div and height: 100%
won't ? shouldn't height:100%
take the rest of space left?
try it here: https://codesandbox.io/s/ecstatic-star-1wxx12?file=/src/App.js
import React from "react";
import { Allotment } from "allotment";
import "./styles.css";
import "allotment/dist/style.css";
export default function App() {
return (
<div className="App">
<div style={{ background: "blue", minHeight: "42px" }}>Monitor</div>
<div style={{ display: "flex", height: "100%", background: "darkblue" }}>
<div
style={{
border: "1px solid orange",
width: "100px",
height: "100%",
background: "gray"
}}
>
side content
</div>
<div style={{ width: "100%", height: "100%" }}>
<div
style={{
width: "100%",
height: "100%",
background: "red",
border: "3px solid yellow"
}}
>
<Allotment>
<Allotment.Pane>
<div style={{ height: "40px", background: "brown" }}></div>
<div
style={{
display: "flex",
height: "93%",
flexDirection: "column"
}}
>
<div style={{ flex: "1" }}>
<img
style={{ width: "100%", height: "auto" }}
src={require("./the-mandalorian.jpg")}
alt="cat"
/>
</div>
<div style={{ height: "20px", background: "brown" }}></div>
</div>
</Allotment.Pane>
<Allotment.Pane>
<div style={{ height: "40px", background: "brown" }}></div>
<div
style={{
display: "flex",
height: "93%",
flexDirection: "column"
}}
>
<div style={{ flex: "1" }}>
<img
style={{ width: "100%", height: "auto" }}
src={require("./nature.jpg")}
alt="cat"
/>
</div>
<div style={{ height: "20px", background: "brown" }}></div>
</div>
</Allotment.Pane>
</Allotment>
</div>{" "}
</div>
</div>
</div>
);
}
English is not my mother language so there could be mistakes.