DW
0
Full-Weight Text in a Transparent Box
is there a way to have solid text in a transparent box, as the text box inherits transparency, is there a way to make the text solid and not inherit the containers' transparency?
is there a way to have solid text in a transparent box, as the text box inherits transparency, is there a way to make the text solid and not inherit the containers' transparency?
So I'm guessing you're doing this with
opacity:0.5
on the containing element. This will apply to the element and all it's children.Depending on the effect you're trying to achieve I'd go for a transparent background colour, this can be done with
background-color:rgba(0,0,0,0.5);
you'll need to convert your hex colour to RGB then the 4th number is the Alpha channel used for opacity.Another option is to use a transparent png as a background image, although these files can get quite large so be carful.