Free and Premium WordPress Plugins & Themes Forums WordPress Themes Luviana Opacity of header
- This topic has 3 replies, 2 voices, and was last updated 4 years ago by Andre Flores.
- AuthorPosts
- November 29, 2020 at 12:36 am #1038035Liam PikeParticipant
Some of my header photo colours are such that my logo and menu doesn’t stand out enough. I want to put a black semi-opaque bar behind the logo and menu to make them stand out better on all images. I’ve added CSS code as follows:
}
body.absolute-menu .site-header {
background: #000000;
opacity: 0.5;
}However, the logo and menu seem to appear 0.5 opaque too rather than 1.0 opaque.
How can I keep the logo and menu at 1.0 so the colours are vivid and stand out against the 0.5 background bar?
Kind regards
Liam.
December 2, 2020 at 10:50 am #1040790Andre FloresModeratorHello Liam,
You may use the following code to add a 0.5 opacity black background:
body.absolute-menu .site-header { background: rgba(0, 0, 0, 0.5); }
Regards,
AndreDecember 12, 2020 at 9:00 pm #1045927Liam PikeParticipantThanks. That’s worked, but the header seems to overlap with the box around the text overlaid over the images on the slider.
I’ve used:
div.child-page-content-wrapper {background: rgba(0, 0, 0, 0.2);
}to try to make the text over the images easier to read, but the area that’s got the opacity is too large – far larger than the text (both horizontally and vertically). It is possible to limit the opacity to the area nearer the text please? The website is dev20.bongoholidays.co.uk.
December 16, 2020 at 8:17 am #1047587Andre FloresModeratorHello Liam,
The code you have used is the closest to what you are trying to achieve. Alternatively you may add opacity background to the slide title and content separately, but it will not look really nice. You may try the code below to see how it will look like:
.luviana-front-page-header .child-pages-list .child-page-title { background: rgba(0, 0, 0, 0.2); } .luviana-front-page-header .child-pages-list .child-page-content { background: rgba(0, 0, 0, 0.2); }
Regards,
Andre - AuthorPosts
- You must be logged in to reply to this topic.