overlay fullscreen hero/slider with partial opacity color

1 reply · opened Sep 13, 2016

WweareashcoSep 13, 2016

I'm using the following code to display a fullscreen hero image (sometimes will also be individual slides for a slideshow, but this code is just a single background image). Rather than having to edit the actual image, I would like to have a fullscreen overlay color where I can set the opacity in order to have white text display well. Is there a way (i.e. html/css code) built into Canvas to accomplish this?


	
		
			
				Lorem ipsum
				
Lorem ipsum dolor sit.

			
		
	

	[](#)

I tried using the following css, but it didn't work:

#slider > div:after { 
	position:absolute;
    content:'';
    top:0;
    left:0;
    right:0;
    bottom:0;
    background:rgba(0,0,0,0.5);
    z-index:-1;
}
SSemicolon WebSTAFFSep 15, 2016

Hello,

This is Definitely Possible and you can simply use the .video-wrap Container to apply a Overlaying Background Color. Please consider using the following code:


	
		
			
				Lorem ipsum
				
Lorem ipsum dolor sit.

			
		
		
			
		
	

	[](#)

You can simply change the Background Color in the .video-overlay DIV. This will definitely work fine.

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard