2

I am working on an enterprise wiki site collection inside sharepoint farm 2013 on-premises. now i enable the metadata navigation and filtering site feature, and i added 5 managed metadata site columns. then i wrote the following script/css to move the key filters fields to be displayed on the top of the page instead of being shown on the left hand side of the screen:-

<script type="text/javascript">
$(document ).ready(function() {
 $("#idKeyFiltersContainer").appendTo("#DeltaPageStatusBar");
$ ("#idKeyFiltersHeader").insertAfter("#idKeyFiltersContainer");
$ ("<p></p>").insertBefore("#idKeyFiltersHeader");
$ ("<hr/>").insertAfter("#idKeyFiltersHeader");
$ ("<hr/>").insertBefore("#idKeyFiltersContainer");
});
</script>
<Style type="text/css">
.ms-KFHeadV3.ms-KFHead
{
display:none;
}
#navresizerHorizontalBar
{
display:none;
}
#ctl00_PlaceHolderLeftNavBar_PlaceHolderQuickLaunchBottom_idNavLinkViewAll
{
display:none;
}
.ms-tv.box {
display:none; /* Hide the Key filters until the jquery has moved the element */
margin-left:0px; /* Align the key element Div with "New Item buttons" */
    }
#idKeyFiltersContainer {
        width: auto !important; /* Stretch the background color for the key filter buttons */
    }
 .ms-KFLabelAndBodyContainer {
        display: inline-block;
        float: left;
width:fixed !important;
height:fixed !important;
    }
    #navresizerVerticalBarPositionHelper {
        display: none; /* Hides the vertical bar that allows stretching the left navigation */
    }
.ms-standardheader.ms-KFLabel
{
color:#008cd2;
font-weight:bold;
}
hr{ height: 12px; border: 0; box-shadow: inset 0 12px 12px -12px  rgba(0, 0, 0, 0.5); }

</style>

now the key filters got moved correctly to the top of the page, as follow:-

enter image description here

but the problem will occur when i moved the mouse focus over the "standard" key filter, where the key filters will float wrongly as follow:- enter image description here

now on other projects i use the same script/css to move the key filters and it is working well. but on those projects the key filters are drop-down lists and not managed metadata columns. so is there a way to fix this? so the key filters will not float when i move the mouse over them?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.