javascript - Position two divs in a jQuery UI tabs properly? -
i noob css programmer , need little help. here 2 screenshots:
and
i need position tree , tinymce editor exist in divs in tab area. can see bottom tab border high instead of below tree , editor.
here html code:
@{ viewbag.title = "demo"; } <link href="../../plugins/jqueryui/css/jquery-ui.css" rel="stylesheet"/> <link href="../../content/style.css" rel="stylesheet" type="text/css" /> <link href="../../plugins/jstree/style.css" rel="stylesheet" type="text/css" /> <link href="../../plugins/tinymce/skins/lightgray/skin.min.css" rel="stylesheet" type="text/css" /> <link href="../../plugins/tinymce/skins/lightgray/content.min.css" rel="stylesheet" type="text/css" /> <h2>demo</h2> <fieldset> <legend>select language: </legend> <label for="mk-mk">mk</label> <input type="radio" name="langid" value="mk-mk" id="mk-mk" checked> <label for="en-us">en</label> <input type="radio" name="langid" value="en-us" id="en-us"> <br/> <br/> <div id="tabs"> <ul> <li><a id="t1" href="#tabs-1">first</a></li> <li><a id="t2" href="#tabs-2">second</a></li> <li><a id="t3" href="#tabs-3">third</a></li> </ul> <div id="tabs-1"> <select name="domainselect" id="domainselect"> </select> <br /> <br /> <select name="surveyselect" id="surveyselect"> </select> <br /> <br /> <input type="text" id="clfreqtext"/> <br /> <br /> <select name="clperiodselect" id="clperiodselect"> </select> <br /> <br /> <select name="clyearselect" id="clyearselect"> </select> <br /> </div> <div id="tabs-2"> <div class="treeblock"> <div id="jstree_div"></div> </div> <div class="editorblock"> <textarea rows="10" cols="10" id="texteditor">next, free tinymce cloud api key!</textarea> </div> </div> <div id="tabs-3"> </div> </div> <p> <input type="button" value="next" id="nextbtn" /> <input type="button" value="previous" id="prevbtn" /> </p> <p id="statusmsg"></p> <p id="errorsmsg"></p> </fieldset> <script src="../../plugins/jquery/jquery-3.2.1.min.js" type="text/javascript"></script> <script src="../../plugins/jqueryui/jquery-ui.min.js" type="text/javascript"></script> <script src="../../plugins/jstree/jstree.min.js" type="text/javascript"></script> <script src="../../plugins/tinymce/tinymce.min.js" type="text/javascript"></script> <script src="../../plugins/tinymce/theme.min.js" type="text/javascript"></script> <!-- other scripts -->
and style.css contains:
fieldset { border: 0; } label { display: block; margin: 30px 0 0 0; } .overflow { height: 200px; } .treeblock { border: 1px solid grey; padding: 10px 10px; overflow: auto; float: left; height: 350px; width: 350px; margin: 10px 30px 10px 10px; } .editorblock { overflow: auto; float: right; height: 350px; width: 350px; margin: 10px 30px 10px 10px; }
can tell me why jquery ui tabs not of proper size?
note: coding mvc 4/c# , razor, file extension "cshtml" fro view
here happens when change width 50%, 50%. "next" , "previous" buttons should below.
in tabs-2
's css rules add following rule:
overflow:auto
this fix height rendering issue due floated children divs.
Comments
Post a Comment