If I have
<div role="main">
</div>
How do I style main
with CSS? Or do I also have to add an ID or a class to the <div>
?
I would recommend adding an ID or class. It's the most cross-browser and efficient way.
If you can't do this, then you'll need to use an attribute selector:
div[role="main"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With