Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #266504

    WP Version: 3.9.1
    Theme: Enfold
    Website: http://liquorstore.maximfactory.com/videos/

    I have this code for each page:
    .page-id-51 #av_section_1 {
    height: 75px;
    min-height: 75px;
    }

    .page-id-51 #av_section_1 .content {
    padding-top: 20px;
    }

    Is there a way I can either have the same code for multiple pages by using a comma like this:
    .page-id-51,21,151,48,16 #av_section_1 {
    height: 75px;
    min-height: 75px;
    }

    .page-id-51,21,151,48,16 #av_section_1 .content {
    padding-top: 20px;
    }

    OR a code that will just tell all pages to have that result?

    Thank you.

    • This topic was modified 10 years, 6 months ago by Micheal0424.
    #266507

    Hey!

    Commas in CSS work this way:

    .page-id-51 #av_section_1 .content, .page-id-21 #av_section_1 .content, .page-id-151 #av_section_1 .content, .page-id-48 #av_section_1 .content {
    }

    If you want it to apply to all pages simply remove the prefix:

    #av_section_1 {
    height: 75px;
    min-height: 75px;
    }
    
    #av_section_1 .content {
    padding-top: 20px;
    }

    Best regards,
    Josue

    #266515

    Worked perfectly, thanks.

    #266521

    You are welcome, glad we could help :)

    Regards,
    Josue

    #266552

    Wait, I just went to my home page and this is what it looks like now:
    http://liquorstore.maximfactory.com/

    Can I exclude the home page from having this as well?

    Thanks.

    #266554

    Add this too:

    .home #av_section_1 .content{
    padding-top: 0 !important;
    }
    
    .home #av_section_1 {
    height: auto !important;
    }

    Cheers!
    Josue

    #266555

    That worked, thanks.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Color Element Coding for height’ is closed to new replies.