2015-01-16 85 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)。所以通過組合這兩個,你可以瞄準任何頁面的任何區塊。