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

demo!

you can find more attribute selectors here.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -