阻止子 div 创建填充,但仅限于 css 中的一个 div id
我目前正在使用 Joomla 创建一个网站,但在某个模块应用填充时遇到问题。问题在于 Joomla 你有我似乎无法覆盖的模块类。布局如下:
<div id="rt-page-surround">
<div class="rt-container">
<div class="rt-container-bg">
<div id="rt-drawer">
<div id="rt-header">
<div class="rt-grid-6 rt-alpha">
<div class="rt-grid-6 rt-omega">
<div class="thumbnail_scroller">
<div class="rt-block">
<div class="module-content">
<div id="jdv_iscroll122_wrap" class="jdv_iscroll_wrap " style="width: 620px; height: 110px; ">
<div id="jdv_iscroll122_inner" class="jdv_iscroll_inner horizontally" style="width: 32766px; height: 110px; left: 0px; ">
</div>
我试图修改的模块是thumbnail_scroller,问题是它从rt-block获取15px的填充。如果我将 rt-block 设置为 padding:0px 这会给thumbnail_scroller带来所需的效果,但它也会将零填充应用于页面上的其他所有内容,因为 rt-block 类与页面上的许多其他元素共享(这是方式该模板由作者编码)。我想要做的是将零填充应用于 rt-block,但仅适用于thumbnail_scroller 模块。
我已经尝试过
.thumbnail_scroller {padding:0px !important}
,但这似乎没有任何作用,有人对此有任何想法吗? :-)
I am using Joomla to create a website at the moment and I am having problems with a certain module getting padding applied to it. The problem is with Joomla you have classes for the modules that I cant seem to override. The layout is as follows :
<div id="rt-page-surround">
<div class="rt-container">
<div class="rt-container-bg">
<div id="rt-drawer">
<div id="rt-header">
<div class="rt-grid-6 rt-alpha">
<div class="rt-grid-6 rt-omega">
<div class="thumbnail_scroller">
<div class="rt-block">
<div class="module-content">
<div id="jdv_iscroll122_wrap" class="jdv_iscroll_wrap " style="width: 620px; height: 110px; ">
<div id="jdv_iscroll122_inner" class="jdv_iscroll_inner horizontally" style="width: 32766px; height: 110px; left: 0px; ">
</div>
The module I am trying to modify is thumbnail_scroller, the problem is it is getting 15px of padding from rt-block. If I set rt-block to padding:0px this gives the desired affect to thumbnail_scroller but it also applies the zero padding to everything else on the page as the rt-block class is shared with numerous other elements on the page (this is the way the template is coded by the author). What I want to do is apply zero padding to rt-block but only for the thumbnail_scroller module.
I have tried
.thumbnail_scroller {padding:0px !important}
but this seems to do nothing, anyone any ideas on this one ? :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这专门针对具有 rt-block 类的 div,这些 div 位于具有thumbnail_scroller 类的 div 内。
This specifically targets divs with the rt-block class that are inside a div with the thumbnail_scroller class.
您可以通过在 CSS 中尝试一些超特定的内容,例如:
该指令将仅适用于
thumbnail_scroller
类的div
(如果它位于div< 中) /code> rt-block 类的容器。
(针对
div
订单进行编辑 - 重新阅读您的问题。){:Ø)You can be hyper-specific by trying something within your CSS like:
That directive will then apply only to a
div
of classthumbnail_scroller
IF it sits within adiv
container of classrt-block
.(Edited for
div
order - re-read your question.) {:¬)