Background Image Resize Using CSS

In this topic we are going to discuss about the technique to resize the background image as per window resolution.

Most of time we are thinking about of jquery and JavaScript techniques but we can find solution with the help of CSS itself.

simple to apply and also very effective, Let we see the coding.

HTML Code :

{code type=css}


Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularized in the 1960s with the release of Letterset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

CSS Code :
html, body { margin: 0 auto; padding: 0; width: 100%; height: 100%; }
img { border: 0;}

img#selBack
{
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: -1;
}

div#selContent
{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#selContent p{
color:#FFFFFF;
padding:10px;
}
{/code}

Also you can see the Demo, Please click here
  • Share/Bookmark

This entry was posted on Saturday, July 3rd, 2010 at 3:33 am and is filed under CSS Tips. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

9 Responses to “Background Image Resize Using CSS”

  1. Get started making money blogging Says:

    Take a look at these blogs for an example of well written articles and……

  2. reverse-records-lookup-online Says:

    I this blog is really great. I’m glad that i found a place to get such good information. Keep up the good work!…

  3. Lyndall Says:

    That’s not just the best asenwr. It’s the bestest answer!

  4. custom writing service Says:

    Thank you to sharing helpful information

  5. SEO Agentur Says:

    Great work! That is the type of info that should be shared across the internet.

  6. widescreen wallpapers Says:

    This is my Excerpt…

    I saw this really good post today….

  7. picture search engine Says:

    Very helpful post man, thanks for the info.

  8. tae min Says:

    I am trying to build a blog as part of a project, and I have been told not use blogger or any of the blog building websites, Requirement is to get access to my blog privately without using any public site that requires me to log on to them before i g…

    How can I do a live streaming webcast on Blogger?…

  9. how can i get taller fast Says:

    how can i get taller fast…

    [...]Background Image Resize Using CSS | Cogzidel Templates Blog[...]…

Leave a Reply

« Back to text comment