I have an Electron app with personalized title bar (close and minimize button). When I show the border of all HTML elements in my window, I noticed that my body and my HTML tag don't take the entire window and I need that because I need to put border to my window. I don't know what is the problem, Thanks for your help.
I tried to put height: 100%; in CSS for HTML and body tag but that doesn't work. I also tried with margin: auto; but that doesn't work either.
Here is the screenshot of the app, first with height:100% (with a scrollbar and I don't want it) and second without.


The CSS:
*/*, *::after, *::before*/ {
/* ~~~~~~ Disable elements dragging ~~~~~~ */
-webkit-user-select: none;
-webkit-user-drag: none;
-webkit-app-region: no-drag;
/* ~~~~~~~~~~~~~ Reset script ~~~~~~~~~~~~ */
cursor: default;
margin: 0;
padding: 0;
border: 2px solid blue;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
html,
body {
/*height: 100%;*/
border: 4px solid red;
background-color: #212121;
}
#TitleBar {
-webkit-app-region: drag;
background-color: #1a1a1a;
}
/* ##################################################################### */
/* ############################### Images ############################## */
/* ##################################################################### */
#Icon {
width: 4%;
height: 4%;
}
#ControlButtons {
float: right;
}
#Close-Btn {
width: 30px;
height: 30px;
}
#Min-Btn {
width: 30px;
height: 30px;
}
The html:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>MyClipboard</title>
<link rel="stylesheet" href="Styles/HomeStyle.css" />
</head>
<body>
<div id="TitleBar">
<img src="Images/clipboard_96px.png" id="Icon"></img>
<div id="ControlButtons">
<input type="image" id="Min-Btn" src="Images/minimize_window_96px.png">
<input type="image" id="Close-Btn" src="Images/close_window_96px.png">
</div>
</div>
<div id="Menu"></div>
<div id="Content"></div>
<script>
require('./Control.js')
</script>
</body>
</html>
Thanks for your response!