Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

Monday, May 14, 2012

Quick Lunch Box in Results.aspx

I run into something very strange in the Results.aspx page OOTB. Suddenly a wired box appeared. It seems to be the Quick Lunch zone but without the items inside. The wired thing is in the CSS code there are styles to hide it and fix it, but they are not working properly.

The wired box on the left below the status bar:



The CSS:


The thing is that the CSS have the styles as display:none, float:left and more to hide it when you don’t have the left navigation but it seems to ignore it.
So, in the hard way, as always, add these to the CSS / to the <style> in the page so it will do the work properly:


1.  #s4-mainarea #s4-leftpanel{   
2.    display:none!important;   
3.  }   
4.  .s4-ca {   
5.      background-color: inherit;   
6.      margin-left: 0px!important;   
7. 

Sunday, February 12, 2012

Centered layout with CSS & v4.master

When customizing SharePoint 2010 Master Page with a static width, you often want to center the content of the page.
Here is the CSS for centering the contents in the ribbon container and letting the container it behave as designed:
#s4-ribbonrow > #s4-ribboncont > #RibbonContainer > #Ribbon > .ms-cui-ribbonTopBars > div {
width: 990px;
margin: 0 auto;
float: none;
}

#s4-ribbonrow > #s4-ribboncont > #RibbonContainer > #Ribbon > .ms-cui-ribbonTopBars > div,
#s4-bodyContainer > div,
body #s4-titlerow > div
{
width: 990px;
margin: 0 auto;
float: none;
}

read more at: