2015-01-16 82 views
0

我在我的网站(我使用Drupal)上显示,在的主页和推荐页面上显示一个块。缩小一页的字体尺寸

由于我增加了块的字体大小,现在在主页上看起来不错,但在证书页面上并不怎么样!

首页:http://www.workbooks.com 褒奖页:http://workbooks.com/testimonials

在讨论的文字如下:

See how Workbooks #1 rated web based CRM software can help your organisation to increase revenue, streamline businesses processes and reduce costs. 
Workbooks extends beyond traditional CRM to include sales order processing, contract management and invoicing, so you can manage all your customer 

现在,我可以很容易地改变字体大小,但因为它是在主页上我想理想只有在内容类型显示在推荐页面(/推荐书)上时才能减小字体大小,这是可能的吗?

+0

是的,有可能。只需给学生打个礼包,然后你就可以像:.tetilmonials .yourclass [/ *你的规则* /] –

回答

2

只需添加这个CSS

.section-testimonials .field-content p{ 
font-size: 11px; 
line-height: 14px !important; 
margin-top: 4px; 
} 

注:当心你对此P A的CSS在线 - 字体大小:15像素;你最好删除。

0

既然你有身体标签具有页面特定类(。第-推荐),

<body class="html not-front not-logged-in no-sidebars page-testimonials section-testimonials page-views container" > 

你可以把这个主CSS的网站:

.page-testimonials .row-first .col-first .field-content p { 
font-size: 12px !important;} 

另一种解决方案是如果写入<p style="font-size: 15px;">编辑框的内容,所以在代替你写<p class="testimonials-box">

然后,您可以将此添加到您的主CSS,只针对首页的字体大小,并让其他地方的默认字体大小。

.front p.testimonials-box {font-size:15px;} 

您使用.front为目标的头版(也就是在你的代码CSS类,因为它是现在)。

0

在drupal中,每个显示的内容类型都将一些CSS类添加到body元素。同样页面上的每个块都有一些类(和/或id)。所以通过组合这两个,你可以瞄准任何页面的任何区块。