Skip to content

Instantly share code, notes, and snippets.

@Ashkanph
Created February 26, 2019 10:37
Show Gist options
  • Save Ashkanph/15b9580f5f47a4a4f8439fb35d9f364a to your computer and use it in GitHub Desktop.
Save Ashkanph/15b9580f5f47a4a4f8439fb35d9f364a to your computer and use it in GitHub Desktop.
A grid split view html page with splitjs
<!DOCTYPE html>
<html>
<!-- Source: -->
<!-- https://stackoverflow.com/questions/47690562/how-to-create-full-horizontal-row-with-split-js -->
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/split.js/1.3.5/split.min.js"></script>
<style>
html,
body {
height: 100%;
}
body {
padding: 8px;
background-color: #F6F6F6;
box-sizing: border-box;
}
.split {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
overflow-y: auto;
overflow-x: hidden;
}
.content {
border: 1px solid #C0C0C0;
box-shadow: inset 0 1px 2px #e4e4e4;
background-color: #fff;
}
.gutter {
background-color: transparent;
background-repeat: no-repeat;
background-position: 50%;
}
.gutter.gutter-horizontal {
cursor: col-resize;
background-image: url('../grips/vertical.png');
}
.gutter.gutter-vertical {
cursor: row-resize;
background-image: url('../grips/horizontal.png');
}
.split.split-horizontal,
.gutter.gutter-horizontal {
height: 100%;
float: left;
}
</style>
</head>
<body>
<div id="a" class="split content"></div>
<div id="b" class="split">
<div id="d" class="split content split-horizontal"></div>
<div id="e" class="split content split-horizontal"></div>
<div id="f" class="split content split-horizontal"></div>
</div>
<div id="c" class="split content"></div>
<script type="text/javascript">
Split(['#a', '#b', '#c'], {
gutterSize: 20,
cursor: 'pointer',
direction: 'vertical',
});
Split(['#d', '#e', '#f'], {
sizes: [15, 70, 15],
gutterSize: 20,
cursor: 'row-resize',
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment