連続する ID・クラスを連続で指定する

今更ながら、学んだこと。

例えば、写真をまとめたギャラリーを複数表示する際、ギャラリー1,ギャラリー2,ギャラリー3・・・
とタイトル(h3)や、文字色、背景色などをまとめて指定したい場合のCSS。

[id^="gallery"] h3{
	font-size : 18px !important;
	border-top:none !important;
	border-bottom:none !important;
	border-bottom-color:#fff !important;
	background-color:transparent !important;
	margin-bottom: -3px !important;
	padding:0 !important;
}
[id^="gallery"] h3:after , [id^="gallery"] .subSection-title:after{
	 border: none !important;
    border-bottom : none !important;
	border-bottom-color:#fff !important;
	 background-color:transparent !important;
	content:none;
}

.gallery{
	margin-left: 3% ;
	}
@media (max-width: 750px) {.gallery{
	margin-left: 4% ;
	margin-right: -5% ;
	}
}