I have a block of html something like this:
<div class="message-box01">...</div>
<div class="message-box02">...</div>
<div class="message-box03">...</div>
The 2-digit number appended to 'message-box' is breaking my css because the definition is like so:
.message-box ul li {
background: #fff;
color: #fff;
width: 30px;
height: 30px;
border-radius: 15px;
font-size: 25px;
text-align: center;
padding-top: 15%;
transition: all 0.2s ease-in-out;
}
So I'm wondering if there's a way to use a regex in the class definition, similar, I suppose, to what I'm seeing here: another css related page
to use pseudo-code:
.message-box[\d*] {
...
}
Or something like that.
Alternatively, is something like this possible:
[id^='messages-box'] ul li {
list-style-type: none;
float: left;
}
box01. Anyway, you will need to usemessage-box01to change the styles for this element specifically so I do not think there is a lot of problems to add an ID.