2012-06-19 57 views
1

我一直在調整一些CSS在那裏我改變錨標籤的樣式。這工作正常。讓我感到困惑的是,爲什麼與不同的類/ ID完全不同的div的東西會受到這種樣式的影響? (例如,我的小風格增添造型到頁面底部的小DIV塊,但由於一些奇怪的原因,它開始影響管理導航欄往上頂)順便說一句,我工作的一個DotNetNuke的皮膚。混淆了CSS影響塊它不應該是一個DNN皮膚

通過Chrome的檢查選項看,它就像它的繼承這些樣式,即使有應該沒有鏈接到這個樣式類我創造!

我檢查了我的DIV,他們構成對正確。

所以我只是想知道還有什麼我可以檢查,試圖阻止這種情況發生。我可能會錯過一些非常簡單/明顯的東西。

謝謝!

編輯:嗯是啊,很明顯,我應該已經包含的代碼;)我傻!

確定這裏是影響皮膚的CSS代碼:

#ehcbreadcrumbs { 
    background-color: #BCBCBC; 
    color: White; 
    font-size: 1.1em; 
    padding-top: 4px; 
    padding-right: 0px; 
    padding-bottom: 4px; 
    padding-left: 10px; 
    margin-top: 5px; 
} 
#ehcbreadcrumbs a, a:link { 
    text-decoration: none; 
    color: White; 
    font-size: 1.1em; 
} 

#bottomnavbar { 
    padding-top: 4px; 
    padding-bottom: 4px; 
    display: table; 
} 
#bottomnavbar ul { 
    margin: 0 auto; 
} 
#bottomnavbar ul li { 
    display: inline; 
} 
#bottomnavbar a, a:link { 
    text-decoration: none; 
} 
#bottomnav a, a:link { 
    font-size: 14px; 
} 

這裏是皮膚文件:

<%@ Control language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %> 
<%@ Register TagPrefix="dnn" TagName="LANGUAGE" Src="~/Admin/Skins/Language.ascx" %> 
<%@ Register TagPrefix="dnn" TagName="LOGO" Src="~/Admin/Skins/Logo.ascx" %> 
<%@ Register TagPrefix="dnn" TagName="SEARCH" Src="~/Admin/Skins/Search.ascx" %> 
<%@ Register TagPrefix="dnn" TagName="NAV" Src="~/Admin/Skins/Nav.ascx" %> 
<%@ Register TagPrefix="dnn" TagName="TEXT" Src="~/Admin/Skins/Text.ascx" %> 
<%@ Register TagPrefix="dnn" TagName="BREADCRUMB" Src="~/Admin/Skins/BreadCrumb.ascx" %> 
<%@ Register TagPrefix="dnn" TagName="USER" Src="~/Admin/Skins/User.ascx" %> 
<%@ Register TagPrefix="dnn" TagName="LOGIN" Src="~/Admin/Skins/Login.ascx" %> 
<%@ Register TagPrefix="dnn" TagName="LINKS" Src="~/Admin/Skins/Links.ascx" %> 
<%@ Register TagPrefix="dnn" TagName="PRIVACY" Src="~/Admin/Skins/Privacy.ascx" %> 
<%@ Register TagPrefix="dnn" TagName="TERMS" Src="~/Admin/Skins/Terms.ascx" %> 
<%@ Register TagPrefix="dnn" TagName="COPYRIGHT" Src="~/Admin/Skins/Copyright.ascx" %> 
<%@ Register TagPrefix="dnn" TagName="STYLES" Src="~/Admin/Skins/Styles.ascx" %> 
<%@ Register TagPrefix="dnn" TagName="MENU" Src="~/DesktopModules/Infinity.Menu/ViewMenu.ascx" %> 


<%@ Register TagPrefix="snapsis" Namespace="Snapsis.DNN.Skins" Assembly="Snapsis.DNN.NavMenu" %> 
<%@ Register TagPrefix="ddr" TagName="DDRMENU" src="~/DesktopModules/DDRMenu/Menu.ascx" %> 
<%@ Register TagPrefix="ddr" Namespace="DotNetNuke.Web.DDRMenu.TemplateEngine" Assembly="DotNetNuke.Web.DDRMenu" %> 


<%@ Register TagPrefix="google" TagName="FOOTER" Src="Footer.ascx" %> 



<script src="<%= Page.ResolveUrl("Portals/_default/Skins/ehc2011/js/common.js") %>" type="text/javascript"></script> 


<div class="cpanel_right"> 
    <div class="cpanel_left"> 
     <div runat="server" id="ControlPanel"></div> 
    </div> 
</div> 
<div class="clear"></div> 

<div class="wrapper"> 
    <div class="layout"> 
     <!--Head Start--> 
     <div class="BCKhead"> 
      <div class="logo"><dnn:LOGO runat="server" id="LOGO1" /> 
       <h1 class="hideFromView">XXXXXX</h1> 
       <h2 class="hideFromView">XXXXXXX</h2> 
      </div> 
      <div class="top"> 
       <div class="topmenu"> 
        <ul> 
        <li class="last"><a href="/TheXXXXpilot/Deliveringtheproject/Theprojectteam/tabid/66/language/en-AU/Default.aspx" title="Contact Us">Contact Us</a></li> 
        <li><a href="/TheXXXXpilotprogram/FrequentlyAskedQuestions/tabid/137/language/en-US/Default.aspx" title="View the FAQ">FAQ</a></li> 
        <li><a href="/UsetheXXXX/tabid/155/language/en-US/Default.aspx" title="Use the XXXX">Use the XXXX</a></li> 
        </ul> 
        <div class="clear"></div> 
       </div> 

       <div class="accessibility"> 
       <a href="javascript:changeFontSize(-1)" title="Decrease font size"><img src="<%= Page.ResolveUrl("Portals/_default/Skins/ehc2011/images/resizesmall.gif") %>" alt="Decrease font size"/></a>&nbsp;<a href="javascript:changeFontSize(1)" title="Increase font size"><img src="<%= Page.ResolveUrl("Portals/_default/Skins/ehc2011/images/resizelarge.gif") %>" alt="Increase font size"/></a> 
       </div> 

       <div class="searchbox"> 
        <div style="display:none"></div> 
        <div id="dnn_dnnSEARCH_DropDownSearch"> 
         <dnn:SEARCH ShowWeb="false" ShowSite="false" UseDropDownList="false" Submit="Search" runat="server" ID="dnnSearch2" CssClass="searchbox"/> 
        </div> 
       </div>     
      </div> 
      <div class="clear"></div> 
     </div> 
     <!--Head End--> 
     <!--Container Start--> 
     <div class="container_inner" id="container_inner"> 
      <div class="leftcontent"> 
       <div class="mainmenu innerHeight"> 

        <Snapsis:NavMenu id="LeftNav" CacheTabs="false" Level="0-2" Type="Hover" 
        OnlyExpandActive="false" ShowType="Always" 
         EnableViewState="true" 
         runat="server" ExcludeTabs="Admin,Host" /> 
        <div class="clear"></div> 
       </div> 
       <div style="height:5px; overflow:hidden; background:#fff;" id="WhiteDiv"></div> 
       <div id="LeftPane" runat="server" class="LeftPane"></div> 
      </div> 
      <div class="rightcontent"> 
       <div class="banner"><a href="/UsetheXXXX/tabid/155/language/en-US/Default.aspx" ><img src="<%= Page.ResolveUrl("Portals/_default/Skins/BCKGraphic/images/inner_banner.jpg") %>" /></a></div> 
       <div class="RightDiv"> 
       <div id="ehcbreadcrumbs"> 
       <dnn:TEXT runat="server" id="dnnTEXT" Text="You are here >" ResourceKey="Breadcrumb" /> <dnn:BREADCRUMB ID="dnnBREADCRUMB" RootLevel="0" Separator="&nbsp;>&nbsp;" runat="server" /> 
       </div> 
       <div id="RightPane" runat="server" class="RightPane"></div> 
       </div> 
      </div> 
      <div class="clear"></div> 
      <div id="ContentPane" runat="server" class="ContentPane"></div> 
      <div class="clear"></div> 
     </div> 
     <div class="clear"></div> 

     <div class="clear"></div>     
     <!--Container End--> 
     <div class="bottomcontent"></div> 
     <div id="bottomnavbar"> 
      <ddr:DDRMENU MenuStyle="sitemap" NodeSelector="RootOnly" runat="server" ></ddr:DDRMENU> 
     </div> 
    </div> 
</div> 

<!--Foot Start--> 
<div class="footer"> 
    <div class="footer_con"> 
     <div>footer text</div> 
     <div class="clear"></div> 
    </div> 
</div> 

<% If DotNetNuke.Security.PortalSecurity.IsInRoles("Administrators") Then%> 
<div class="copyright"> 
Logged in as <dnn:USER runat="server" id="dnnUSER" CssClass="user" /> | 
<dnn:LOGIN runat="server" id="dnnLOGIN2" CssClass="copyright" Text="Login" /> 
</div>      
<%End If%> 

<!--Foot End--> 

<dnn:STYLES runat="server" id="StylesIE6" Name="IE6Minus" StyleSheet="css/ie6skin.css" Condition="LT IE 7" UseSkinPath="true" /> 

<script type="text/javascript" > 
if(dnn_LeftPane.className.indexOf("DNNEmptyPane") != -1) 
{ 
    if(dnn_ContentPane.className.indexOf("DNNEmptyPane") == -1) 
    { 
     document.getElementById("WhiteDiv").style.display = "none"; 
     document.getElementById("container_inner").className = "container_inner_setting"; 
    } 
} 
else 
{ 
     document.getElementById("WhiteDiv").style.display = ""; 
     document.getElementById("container_inner").className = "container_inner"; 
} 
</script> 

<google:FOOTER id="footer1" runat="Server"></google:FOOTER> 

所以在bottomnavbar風格/ bottomcontent似乎影響的某些方面DNN管理欄(ControlPanel)。它也會影響已登錄的用戶部分,如果我更改bottomnavbar中的字體大小,「版權」塊鎖定位中的字體大小也會更改大小。這讓我感到困惑,因爲DIV塊(對我來說)看起來正確配對。
是的,我知道這是不是很漂亮;)(皮膚最初是由其他人創建的,我已經採取了做出改變的話)

+0

這是_impossible_告訴,如果你不張貼在你的問題的任何CSS或HTML。編輯它,然後粘貼到相關的HTML和CSS中。 – Bojangles

+0

我們所能做的只是猜測什麼*可能會出錯,直到我們能夠掌握一些代碼。 – Aaron

回答

2

你的問題是逗號

#ehcbreadcrumbs a, a:link { 

確實應該

#ehcbreadcrumbs a, #ehcbreadcrumbs a:link { 

同樣的事情

#bottomnavbar a, a:link { 

應該

#bottomnavbar a, #bottomnavbar a:link { 

+0

謝謝!我只是假定該行的任何內容都適用。沒有意識到我必須是那個具體。現在檢查我的其他CSS類似的錯誤!認爲它也是如此簡單! – zetetic