I'm using the following code to hide the left hand navigation in SharePoint:
<style type="text/css">
#s4-leftpanel {
display:none !important;
}
.s4-ca{
margin-left:0px !important;
}
</style>
This works great but the issue is when the page loads you can initially see the left hand menu for a few seconds but the code kicks in and it gets hidden. I don't want to see the menu on page load for a few seconds. Is that possible?
EDIT: I should have mentioned more details. I'm doing this within a custom web part. I only want the left hand navigation gone when this web part is applied to a page. I put this CSS within the web part itself.