JSFiddle - React, Tailwind, and code Playground
HTML
<div id="header"><span class="txt">header</span></div>
<div id="navi"><span class="txt">navi</span></div>
<div id="body"><span class="txt">body</span></div>
CSS
.sep_navi2body {
width: 100%;
height: 1px;
background-color: #111;
margin-bottom: 10px;
}
/*装飾用 不要*/
#header {
height: 100px;
}
#navi {
height: 30px;
}
#body {
height: 300px;
}
#header,
#navi,
#body {
position: relative;
border: 1px solid #ccc;
margin-bottom: 10px;
}
#header .txt,
#navi .txt,
#body .txt {
color: #111;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
JavaScript
(function($){
$(function(){
$("#body").before("<div class='sep_navi2body'>");
});
})(jQuery);