What am I doing wrong with the styling on this sharepoint master page?

Here is some sample code

 <div class="Layouts">
            <asp:ContentPlaceHolder ID="Center" runat="server" />
            <asp:ContentPlaceHolder ID="PlaceHolderMain" runat="server" /> 
            <p>&nbsp;</p>
</div>

      

CSS that creates Layouts separators,

.Layouts
{
    background-color: White;
    margin-top: 17px;    
    padding-top: 18px;
}

      

Nothing crazy! The problem I am facing is that without " <p>&nbsp;</p>

" the white background is not filled with what I put in the two ContentPlaceHolders (and no, they have no riding background!)

With <p>&nbsp;</p>

everything works the way I want ... but not as I expected!

Am I doing something wrong or is it a browser or a Sharepoint issue? Is there a better fix than space?

+1


a source to share


1 answer


Does it float ContentPlaceHolder

?



If so, try adding: overflow:hidden;

to the selector .Layouts

.

+3


a source







All Articles