简体   繁体   中英

css works in Firefox, not in Chrome

I recently adjusted the width of a div via css. It works in Firefox, but not in Chrome.

Here's the code:

.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;
}

Am I missing something that Chrome isn't picking up?

Thanks,

Provide HTML for more clarity on the issue. You repeated the css classes in multiple places.

Try this:

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

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

The first line in your posted code

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

Doesn't have opening and closing curly brackets, this will render all the settings below it useless.

if your going to have a blank link but with the style names

.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;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM