I am going to add a custom div in b/w ribbon and workspace div. I find the scrolling bug
HTML
<!-- ribbon -->
<div class="s4-pr s4-ribbonrowhidetitle" id="s4-ribbonrow" style="height: 44px;">
</div>
<!-- ribbon end -->
<!-- ribbon -->
<div id="s4-header">
custom header
</div>
<!-- ribbon -->
<!-- ribbon -->
<div id="s4-workspace" style="height: 1045px; width: 1600px;">
</div>
<!-- ribbon -->
this is the structure of masterpage.
and I m using the following jquery script.
function FixWorkspace() {
// if you are using a header that is affixed to the top (i.e. SharePoint Ribbon) put the ID or class here to change the workspace height accordingly.
var header = '#s4-header';
var width = $(window).width();
var height;
if ($(header).length) {
height = $(window).height() - ($(header).height()+90);
} else {
height = $(window).height();
}
$('#s4-workspace').width(width).height(height);
}
$(document).ready(function() {
FixWorkspace();
});
$(window).resize(function() {
FixWorkspace();
});
on page load, this script works and set the height value but suddenly after some seconds it revert to default height value (i.e 1045px ). any help in this regards.
Aucun commentaire:
Enregistrer un commentaire