gpt4 book ai didi

css - 对 CSS 影响 block 的混淆它不应该在 DNN 皮肤中

转载 作者:行者123 更新时间:2023-11-28 13:32:31 25 4
gpt4 key购买 nike

我一直在调整一些 CSS,以更改 anchor 标记的样式。那很好用。令我困惑的是,为什么完全不同的 div 中具有不同类/ID 的东西会受到这种样式的影响? (例如,我的小样式将样式添加到页面底部的一个小 div block ,但由于某些奇怪的原因,它开始影响顶部的管理导航栏)顺便说一句,我正在研究 DotNetNuke 皮肤。

浏览Chrome中的Inspect选项,它就像继承了这些样式,尽管我创建的这个样式类应该没有链接!

我检查了我的 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 管理栏(控制面板)的某些方面。如果我更改 bottomnavbar 中的字体大小,它也会影响登录的用户部分,“版权” block anchor 位中的字体大小也会更改大小。这让我很困惑,为什么,因为 DIV block (对我来说)看起来正确配对。
是的,我知道它不是很漂亮 ;)(皮肤最初是由其他人创建的,我已经接手对其进行了更改)

最佳答案

你的问题是逗号

#ehcbreadcrumbs a, a:link {

应该是

#ehcbreadcrumbs a, #ehcbreadcrumbs a:link {

同样的事情

#bottomnavbar a, a:link {

应该是

#bottomnavbar a, #bottomnavbar a:link {

等等

关于css - 对 CSS 影响 block 的混淆它不应该在 DNN 皮肤中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11110859/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com