嗨,我在joomla中遇到一些css类的问题。我有两个div在一个模块中,一个是包装器class ="wrapper",另一个是内容class ="content"。内容在包装器中。我想做的是针对内容类目标css样式。通常情况下,我会在样式表中放置.content {my style info},但问题是该类在页面中多次使用。因此,在后端,您可以为模块分配一个类名,所以我将其称为.testimonials。
为了不更改页面上所有其他内容类别,我试图通过添加以下内容来定位它:
.testimonials .content {my style info I am trying to apply}
但是它没有起作用,我知道你可以使用div来做到这一点,所以
#testimonials .content {my style info I am trying to apply}
但我的问题是,是否可以使用类来完成这个任务?如果可以,那么我正在尝试使用以下内容:
.testimonials .content {font-size:12px; width:300px !important;}
出于某些原因,内容没有自动换行而是在段落末端消失不见,因此我想确保一级类别中的内容不会与其他任何内容重叠。奇怪的是,即使我将内容所在的 div 类固定为 50px,它仍然无法换行文本,所以我不确定我是否正确地定位了它。
编辑 >>>>>>>>>>..
Joomla 创建的 html 基本上看起来像这样 >>
<div class="wrapper">
<div class="content">SOME CONTENT</div>
</div>
然后它会像在 Joomla 中一样被包装在数百个其他的 div 中。
我给模块添加了 testimonials 类,所以最终看起来像是这样的:
<div class="testimonials">
<div class="wrapper">
<div class="content">SOME CONTENT</div>
</div>
</div>
编辑3 >>>>>>>好的,这就是它所输出的内容
<div class="testimonials">
<div class="key4-block">
<div class="module-title"><h2 class="title">Client Testimonials</h2></div>
<div class="key4-module-inner">
<div class="module-content">
<script type="text/javascript">
RokStoriesImage['rokstories-184'].push('');
RokStoriesImage['rokstories-184'].push('');
RokStoriesImage['rokstories-184'].push('');
</script>
<div id="rokstories-184" class="rokstories-layout6 content-left" >
<div class="feature-block">
<div class="feature-wrapper">
<div class="feature-container">
<div class="feature-story">
<div class="image-full" style="float: right">
<img src="/sos/" alt="image" />
</div>
<div class="desc-container">
<div class="wrapper">
<span class="content"><p>Arrived in under 30 mins and got my pride and joy home in one piece, the day it conked out on me.</p>
<p>- Mr A Another</p></span>
</div>
</div>
</div>
<div class="feature-story">
<div class="image-full" style="float: right">
<img src="/sos/" alt="image" />
</div>
<div class="desc-container">
<div class="description">
<span class="feature-desc">
<p>Great Service ! , SOS came to the rescue me in no time at all and made my day.</p>
<p>- a customer</p>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
编辑4 >>>>>>
它正在执行以下操作