为什么CSS在我的页面中的CDATA内部呈现似乎从不知所云?

问题描述:

我的母版页文件的标题看起来像这样在我的代码:为什么CSS在我的页面中的CDATA内部呈现似乎从不知所云?

<head runat="server"> 
    <title>Untitled Page</title> 
    <asp:ContentPlaceHolder ID="Head1" runat="server"> 
    </asp:ContentPlaceHolder> 
    <link href="SmartPeep.css" rel="stylesheet" type="text/css" /> 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> 
</head> 

当我查看渲染的网站,它看起来像这样:

<head><title> 
    Smartpeeps :: Home 
</title> 
    <!-- Add jQuery library --> 
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> 

    <!-- Add mousewheel plugin (this is optional) --> 
    <script type="text/javascript" src="fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script> 

    <!-- Add fancyBox --> 
    <link rel="stylesheet" href="fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" /> 
    <script type="text/javascript" src="fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script> 

    <!-- Optionally add helpers - button, thumbnail and/or media --> 
    <link rel="stylesheet" href="fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" /> 
    <script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script> 
    <script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.6"></script> 

    <link rel="stylesheet" href="fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" /> 
    <script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script> 

    <script type="text/javascript"> 
     $(document).ready(function() { 
      $(".fancybox").fancybox(); 
     }); 
    </script> 
    <style type="text/css"> 
     .auto-style2 { 
      color: #FF3300; 
     } 
    </style> 
<link href="SmartPeep.css" rel="stylesheet" type="text/css" /> 

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> 
<style type="text/css"> 
    /* <![CDATA[ */ 
    #SmartpeepMainMenu img.icon { border-style:none;vertical-align:middle; } 
    #SmartpeepMainMenu img.separator { border-style:none;display:block; } 
    #SmartpeepMainMenu img.horizontal-separator { border-style:none;vertical-align:middle; } 
    #SmartpeepMainMenu ul { list-style:none;margin:0;padding:0;width:auto; } 
    #SmartpeepMainMenu ul.dynamic { z-index:1; } 
    #SmartpeepMainMenu a { text-decoration:none;white-space:nowrap;display:block; } 
    #SmartpeepMainMenu a.static { padding-left:0.15em;padding-right:0.15em; } 
    #SmartpeepMainMenu a.popout { background-image:url("/Smartpeeps/WebResource.axd?d=rizp0zWlqOPWgeU28unXjfAtIHIHFUu3Rylnmz9M0DW1D3_YMtnoL8fA7gnTmqC_vPI1gxN8QXg-9vknZDLSsY6V8Vc7p_i6k8fLKNrprps1&t=635116993265614829");background-repeat:no-repeat;background-position:right center;padding-right:14px; } 
    /* ]]> */ 
</style></head> 

我有不知道在哪里可以找到即正在渲染该CSS的CDATA。

问题是,CSS在主站点菜单周围制动了我的页面设计。

我很抱歉,我不能提供更多的信息,但我不知道是什么的详细信息会在这里有帮助的,我的意思是,我不知道这是来自......

如果我能只需编辑它或者甚至可以删除它,那将是理想的。

编辑

这是我的web.config文件:

<?xml version="1.0"?> 
<configuration> 
    <appSettings> 
    <add key="ChartImageHandler" value="storage=file;timeout=20;URL=~/ChartTemp/;"/> 
    </appSettings> 
    <connectionStrings/> 
    <system.web> 
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0"> 
     <assemblies> 
     <add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
     </assemblies> 
    </compilation> 
    <authentication mode="Forms"> 
     <forms name="SmartPeeps" loginUrl="~/Login.aspx" timeout="30" slidingExpiration="true" cookieless="UseCookies"/> 
    </authentication> 
    <authorization> 
     <allow users="?"/> 
    </authorization> 
    <pages controlRenderingCompatibilityVersion="4.0"> 
     <namespaces> 
     <clear/> 
     <add namespace="System"/> 
     <add namespace="System.Collections"/> 
     <add namespace="System.Collections.Generic"/> 
     <add namespace="System.Collections.Specialized"/> 
     <add namespace="System.Configuration"/> 
     <add namespace="System.Text"/> 
     <add namespace="System.Text.RegularExpressions"/> 
     <add namespace="System.Linq"/> 
     <add namespace="System.Xml.Linq"/> 
     <add namespace="System.Web"/> 
     <add namespace="System.Web.Caching"/> 
     <add namespace="System.Web.SessionState"/> 
     <add namespace="System.Web.Security"/> 
     <add namespace="System.Web.Profile"/> 
     <add namespace="System.Web.UI"/> 
     <add namespace="System.Web.UI.WebControls"/> 
     <add namespace="System.Web.UI.WebControls.WebParts"/> 
     <add namespace="System.Web.UI.HtmlControls"/> 
     <add namespace="AjaxControlToolkit"/> 
     </namespaces> 
     <controls> 
     <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/> 
     <add tagPrefix="act" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/> 
     </controls> 
    </pages> 
    <httpRuntime maxRequestLength="1048576" executionTimeout="3600" requestLengthDiskThreshold="1048576"/> 
    <customErrors mode="Off"/> 
    <httpHandlers> 
     <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> 
    </httpHandlers> 
    </system.web> 
    <location path="Members"> 
    <system.web> 
     <authorization> 
     <deny users="?"/> 
     <!-- deny unauthenticated users --> 
     <allow users="*"/> 
     <!-- allow everyone else (authed users) --> 
     </authorization> 
    </system.web> 
    </location> 
    <system.webServer> 
    <validation validateIntegratedModeConfiguration="false"/> 
    <handlers> 
     <remove name="ChartImageHandler"/> 
     <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
    </handlers> 
    </system.webServer> 
</configuration> 
+0

你能告诉你的'web.config'是否有配置的任何SmartPeep模块? –

+0

@GlennFerrie添加了我的web.config文件...在那里没有任何SmartPeep模块,虽然 – Ortund

一个很好的方式来测试是使用Chrome。

使用chrome转到页面。在页面内右击并选择“检查元素”。

它打开右侧栏 - 你可以选择渲染HTML代码和

它会告诉你什么是CSS影响该元件和文件提供的CSS。

在这个例子 - 它表明CSS是在index.html内,从管线未来10

see image - from chome and example.com

+0

它引用default.aspx:54,它在我粘贴的CDATA块中 – Ortund