1

I have a table with classes such as "column-1", "column-2" and so on...

I want to select all the classes that have the word "column" with "-" after it and "some number", as you can see from the structure of the classes I mentioned above.

I want to do it with CSS.

Thanks!

DaffyDuck
  • 182
  • 2
  • 6

1 Answers1

-1

UPDATED ANSWER

div[class^="column-"] {
 /* this selector selects every element start with "column-" */ 
}

OLD ANSWER

these 2 classes to every column

  • every column should have the className column
  • additionally, add className column-n [n=1,2,3...] to each respective column

now you can select every column with,

.column {
 ........
}

select an individual column with n=1,2,3...

.column-n{
 .....
}
  • List item
Shankaja Aroshana
  • 551
  • 1
  • 3
  • 17