It seems like you're looking to target elements with specific IDs that follow a certain pattern. Unfortunately, CSS doesn't have a built-in wildcard selector for this purpose. However, there are some workarounds you can try.
Potential Hacky Solution
You could use a selector like [id^="subtab-"][id*="-sub"]
to match IDs starting with "subtab-" and containing "-sub". This solution may not be perfect and could accidentally select other elements with similar patterns in their IDs.
Another Potential Hacky Solution
If the elements you want to target are always nested inside parent elements with specific IDs, you could consider using the child combinator like
[id^="subtab-"] > [id^="subtab-"]
.
Consider Using Classes Instead
A more efficient approach would be to assign a common class to all the elements you want to target, such as <div class="subtab-sub">
, and then simply use the class selector like .subtab-sub
to style them. Using classes is usually faster than attribute selectors in terms of performance.