You can use the CSS3 Linear Gradient property along with your background-image like this:
#landing-wrapper { display:table; width:100%; background: linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ), url('landingpagepic.jpg'); background-position:center top; height:350px; }
Here’s a demo:
#landing-wrapper { display: table; width: 100%; background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('http://placehold.it/350x150'); background-position: center top; height: 350px; color: white; }
<div id="landing-wrapper">Lorem ipsum dolor ismet.</div>
Related Posts:
- Open source social media icons to download and use on website? [closed]
- CSS calc width and height values
- Center image using text-align center?
- CSS Background Opacity [duplicate]
- How do I vertically align text in a div?
- Hide scroll bar, but while still being able to scroll
- How can I center text (horizontally and vertically) inside a div block?
- Center image horizontally within a div
- Draw Circle using css alone [duplicate]
- Remove CSS class from element with JavaScript (no jQuery) [duplicate]
- Transparent CSS background color
- Prevent line-break of span element
- Is there any way to change input type=”date” format?
- How to align iframe always in the center
- How to center a “position: absolute” element
- Expected RBRACE, but the bracket is there?
- How to make an image center (vertically & horizontally) inside a bigger div
- How to center text with Markdown?
- Set the table column width constant regardless of the amount of text in its cells?
- CSS Display an Image Resized and Cropped
- Disable Scrolling on Body
- How do I make a placeholder for a ‘select’ box?
- FontAwesome icons are not showing, Why?
- Remove border from IFrame
- CSS color vs. background-color vs. background?
- CSS horizontal scroll
- Getting “Failed to load resource: net::ERR_FILE_NOT_FOUND” when trying to load a background image
- CSS: background-color only inside the margin
- Stretch background image css?
- Set cellpadding and cellspacing in CSS?
- Disable Scrolling on Body
- How do I set a background-color for the width of text, not the width of the entire element, using CSS?
- CSS Background Image Not Displaying
- Changing image sizes proportionally using CSS
- How to give the background-image path in CSS?
- How to overlay image with color in CSS?
- CSS Background image not loading
- Outline radius?
- text-overflow: ellipsis not working
- How to reference nested classes with css?
- Why is there an unexplainable gap between these inline-block div elements?
- right align an image using CSS HTML
- CSS Background Image Not Displaying
- How to align content of a div to the bottom
- html not linking css
- How to outline text in HTML / CSS
- How to draw a dotted line with css?
- Removing border from table cells
- How to stick text to the bottom of the page?
- How to make blinking/flashing text with CSS 3
- Why doesn’t height: 100% work to expand divs to the screen height?
- How can I position my div at the bottom of its container?
- Why doesn’t height: 100% work to expand divs to the screen height?
- How can I position my div at the bottom of its container?
- How do I install a custom font on an HTML site
- How to overlay one div over another div
- How to align an input tag to the center without specifying the width?
- How to get CSS to select ID that begins with a string (not in Javascript)?
- How can I embed video for discord directly from website?
- Basic CSS – how to overlay a DIV with semi-transparent DIV on top
- difference between width auto and width 100 percent
- Setting table row height
- How do I disable the resizable property of a textarea?
- Is it possible to set the equivalent of a src attribute of an img tag in CSS?
- Place input box at the center of div
- How to display a gif fullscreen for a webpage background?
- Padding a table row
- Set cellpadding and cellspacing in CSS?
- how to do a line break in Bootstrap 3.3.7
- How to align 3 divs (left/center/right) inside another div?
- CSS content property: is it possible to insert HTML instead of Text?
- Vertical align not working on inline-block
- How to increase height of textarea using bootstrap rows and columns
- Indent List in HTML and CSS
- Align an element to bottom with flexbox
- How can I change the thickness of my
tag - Is it possible to put CSS @media rules inline?
- Make padding responsive
- Vertically align text next to an image?
- How to create spoiler text?
- How do I center text in a span?
- text-align justify not working
- HTML not loading CSS file
- How can I center my ul li list in css?
- Is it possible to use css to shrink text to automatically fit the size of the div
- CSS !important not working
- Best way to center a on a page vertically and horizontally?
- How to best set a CSS3 transition to none?
- How to make a div 100% height of the browser window
- How to resize an image to fit in the browser window?
- Why is vertical-align: middle not working on my span or div?
- ow to change the style of the title attribute inside an anchor tag?
- Flex align-items: center not centering items
- HTML / CSS table with GRIDLINES
- Layout a flex box similar to a table?
- How do I clear the content of a div using JavaScript?
- WordPress footer menu floating with height of footer
- Style reply form different than comment form
- Style the last element having a specific class [closed]
- How can I insert a disclaimer in a WordPress site?