homepage Welcome to WebmasterWorld Guest from 54.197.110.151
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Background-size: cover for DIVs
Xenji



 
Msg#: 4562938 posted 10:46 am on Apr 8, 2013 (gmt 0)

Hey everybody,

I've got a little problem while building a site.

Lets say this: [s14.directupload.net...]
is my background image. I set


background: no-repeat center bottom fixed;
background-size: cover;


This works very well on different type of screens. My smaller screen just shows the red area, bigger ones show the whole image.

But now I need to create a div box which covers the red area exactly. I can't use fix width and height or procentage because of background-size: cover.

Do you know any possibility to set this 'background-size: cover' - effect on div boxes?

Thanks for your help!

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved