Why is SharePoint not correctly distributing my HTML and CSS content?

I am trying to add content to the SharePoint Content Editor web part, but when I do this, it appears as if it is ignoring parts of my CSS.

It displays Firefox 3.6 and IE 8 perfectly when it is a separate page, but it turns off when the same code is placed in the web part of the content editor: Click here to view

Often things that are broken in SharePoint when viewed through IE are displayed correctly when the same SharePoint page is viewed in FF; This time the menu was laid out correctly, but the text was the wrong color (should be white).

When I view code using IE Developer Tools, Sharepoint seems to ignore the ad #CAPMenu li height:0;. If I turn off height:0;when viewing code outside of SharePoint or SharePoint using Firefox, the menu will fall apart a bit. When I view a page in SharePoint through IE, the menu is already running, and shutting down height:0;does not change ...

Please, help! This is not the first design that SharePoint does not allow me to use.

Edit in 20101130: I found an article ( http://friendlybit.com/html/default-html-in-sharepoint-2007/ ) on the status of the code that SharePoint 2007 publishes from its main page and the article begins with -My erases my code ...

, doctype :
<HTML xmlns:o="urn:schemas-microsoft-com:office:office"dir = "ltr" __expr-val-dir = "ltr" > '
, quirks, .

20120921: 2010 , , , SP , . , CEWP HTML, , -. SharePoint , : -)

+3
2

, CSS - SharePoint, - -.

, SharePoint - .

SharePoint HTML -:

<table cellspacing="0" cellpadding="0" border="0" width="100%">
    <tbody>
        <tr>
            <td valign="top" id="MSOZoneCell_WebPartWPQ3">
                 <!--Your web part HTML starts here in most cases-->

CSS . CSS SharePoint core.css( 12 ). , , .

, .ms-WPHeader .ms-WPBody ( -), .

, , - Firebug firefox. , ( firefox), , , ( ). , , core.css.

, , CSS , .

, .ms-WPBody (, ), , SharePoint. , , -:

<table cellspacing="0" cellpadding="0" border="0" width="100%">
    <tbody>
        <tr>
            <td valign="top" id="MSOZoneCell_WebPartWPQ3">
                <div class="my-content">Your content</div>
            </td>
        </tr>
     </tbody>
</table>

css, :

.ms-WPBody .my-content
{
    font-size : 12pt;
    /*Other rules you want to override*/
}

, , SharePoint, .

, , , .

, - . , , . ! Important: , ...

.ms-WPBorder, .ms-WPBorderBorderOnly
{
    border: none !important;
}

.ms-PostTitle td
{
    border: none !important;
}

td.ms-PostTitle
{
    border: none !important;
}
+6

Sharepoint CMS CSS . , -. , "! Important" -.

.class { property: value! important; }

, , Sharepoint -.

0

Source: https://habr.com/ru/post/1776565/


All Articles