Merge css lines for several pages

Hello Kharis

I wrote the following lines off in style.css of child-theme for dedicated 2 pages (.page-id-3601 and .page-id-3740 )

I merge these lines with two cases but none of them work properly:

format #1

.page-id-3601 , .page-id-3740 {
#mainnav ul li a,
#mainnav-mobi ul li a {
color: #ffffff !important;
}

#mainnav ul li a:hover,
#mainnav-mobi ul li a:hover  { 
   color: #d65050 !important;
}

}


format #2

.page-id-3601 .page-id-3740
#mainnav ul li a,
#mainnav-mobi ul li a {
color: #ffffff !important;
}

.page-id-3601 .page-id-3740
#mainnav ul li a:hover,
#mainnav-mobi ul li a:hover {
color: #d65050 !important;
}

how can I merge these css lines for several pages?

thanks a lot
Kourosh

Hello there,

Try this code:

    .page-id-3601 #mainnav ul li a,
    .page-id-3740 #mainnav ul li a,
    .page-id-3601 #mainnav-mobi ul li a,
    .page-id-3740 #mainnav-mobi ul li a {
      color: #ffffff !important;
    }

    .page-id-3601 #mainnav ul li a:hover,
    .page-id-3740 #mainnav ul li a:hover,
    .page-id-3601 #mainnav-mobi ul li a:hover,
    .page-id-3740 #mainnav-mobi ul li a:hover {
      color: #d65050 !important;
    } 

Regards,
Kharis