array in css for multiple ID's -
is possible make array css?
<style> #info1, #info2, #info3, #info4 { display: none; } </style>
let's have 20 hidden divs identified id="info1", id="info2" 20 times. don't want declare in styles #info1, #info2, ... #info20. can accomplished array or method.
well, there option use attribute selector:
[id^="info"] { /* gets elements id starting info */ display: none; }
you can find more attribute selectors here.
Comments
Post a Comment