2013-05-06 98 views
0

我最近通過css調整了div的寬度。它適用於Firefox,但不適用於Chrome。css在Firefox中工作,而不是在Chrome中

下面的代碼:

.the_content { 
    padding-left: 60px !important; 
    padding-right: 40px !important; 
} 

.the_content { 
    padding-left: 60px !important; 
    padding-right: 40px !important; 
} 

.the_content.post.type-post.hentry.excerpt.clearfix { 
    padding-left: 60px; 
    padding-right: 40px; 
} 

我失去了Chrome瀏覽器在不拾取東西嗎?

謝謝,

+0

當你說這個功能「不工作」,你到底是什麼意思?這有很多不同的含義。爲了幫助您的問題被其他用戶理解,請嘗試添加一些代碼或[jsFiddle](http://jsfiddle.net)以提供幫助。 – 2013-05-06 04:49:55

+0

.the_content post-type post-post excerpt clearfix刪除這一行 – 2013-05-06 04:51:03

+0

歡迎來到stackoverflow,我沒有理由懷疑爲什麼它不能通過查看你提供的代碼在chrome中工作。你使用的填充材料很少重複。嘗試先把他們俱樂部。如何在[小提琴](http://jsfiddle.net/)中解釋它。 – Rohit416 2013-05-06 04:56:03

回答

0

提供HTML以更清晰地解決問題。你在多個地方重複了css類。

試試這個:

.the_content 
{ 
padding-left: 60px !important; 
padding-right: 40px !important; 
} 

.the_content.post.type-post.hentry.excerpt.clearfix { 
    padding-left: 60px; 
    padding-right: 40px; 
} 
+0

所有優點。對不起,我是一個總喜歡這個,但我真的很感謝每個人的幫助,即使只是告訴我我的無知。我使用上面的代碼來縮減本網站上的博客的.div:http://www.alchemyondemand.com/top-10-words-that-c​​apture-readers-attention/ 我不明白爲什麼調用div類可以在Firefox中使用,但不能在Chrome中使用。 – user1993740 2013-05-06 16:40:21

0

第一行中的發佈代碼

.the_content post type-post hentry excerpt clearfix /* Remove spaces if this is a single class style. if multiple user ","*/ 

不具有開閉花括號,這會使它下面的所有無用的設置。

如果你將擁有一個空白的鏈接,但與樣式名

.the_content post type-post hentry excerpt clearfix {} /*<------------*/ 
.the_content { 
    padding-left: 60px !important; 
    padding-right: 40px !important; 
} 

.the_content { 
    padding-left: 60px !important; 
    padding-right: 40px !important; 
} 

.the_content.post.type-post.hentry.excerpt.clearfix { 
    padding-left: 60px; 
    padding-right: 40px; 
} 
相關問題