html - How to implement app-like template? -
i trying build website make application template:
after reading couple of tutorials here i've got far:

it may bit complicated explaining below:
my template contains lot of div's of them maybe extra, anyway giving div's absolute position , adding overflow-x , overflow-y whenever necessary ended template looking above black bar indicates have div scrolling want.
a couple of notes: tasks table div contains big table inside that's why added both vertical , horizontal scrolling.
right panel div: has lot of other div's , h3 tags no specific styling 4 5 div's same width of right panel , different heights, that's why wanted right panel scroll vertically.
now problem have failed make right panel scroll horizontally, when resize browser widow. looks way when decrease browser window width...
even when decrease width more, it's right panel slides way covering both center , left panel. 
is supposed happen? why right panel not scrolling horizontally center panel when browser resized? because of div's inside right panel?
the fastest way calculate width , height of task-controls , task-table via javascript or better jquery.
example jquery
$(function() { res(); $(window).resize(function() { res(); }); function res(){ var windowwidth = $(window).width(); var leftpanelwidth = $('left-panel').width(); var rightpanelwidth = $('left-panel').width(); $('#task-controls','#task-table').width(windowwidth-leftpanelwidth-rightpanelwidth); } }); edit: here complete, corrected , commented version
<!-- load jquery internet, if u dont want download --> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script> //run when dom (website) load completly. same "$(document).ready()" $(function() { //call own function on first time res(); //evertime when window reiszed user $(window).resize(function() { //call function again res(); }); function res(){ //get sizes var windowwidth = $(window).width(); //the '#left-panel' searches html element id left-panel var leftpanelwidth = $('#left-panel').width(); var rightpanelwidth = $('#left-panel').width(); //set width emements ids #task-controls , #task-table. size window width minus both menus $('#task-controls','#task-table').width(windowwidth-leftpanelwidth-rightpanelwidth); } }); </script> if u want build app website, should learn jquery http://api.jquery.com/ http://www.w3schools.com/jquery/jquery_ref_selectors.asp
or did missunderstood question? want prevent cropping of center-panel
Comments
Post a Comment