Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
something like the banner video in www.cinnamontoast.ca

I was told to try background-size: cover; but this didn't work well..

I tried the following code..

<div id="header">
<div id="header-wrap">
header content
</div>
</div>



css:

#header {
background: url(background.jpg);
background-size: cover;
}


but this makes the background height limited to where the header elements end..
what I want is a header background that takes 100% on width, and whatever keeps aspect ratio on height even if the header elements (logo and ul) end before that..
Posted
Updated 13-Oct-13 5:53am
v6
Comments
vbmike 13-Oct-13 15:01pm    
Maybe this is what you are looking for: http://tympanus.net/codrops/2013/05/02/fixed-background-scrolling-layout/
Paulo Augusto Kunzel 23-Oct-13 5:46am    
Have you tried setting:

width:100%;
height: 75px;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900