Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I'm looking to make a big jpeg as my background where it stretches and also stays static even if the browser is resized or viewed with a bigger monitor. Was wondering if there was a module that gave this functionality?

share|improve this question

closed as off topic by Nikhil M, Chapabu, Clive Feb 27 '13 at 14:09

Questions on Drupal Answers are expected to relate to Drupal within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
plz expand details –  monymirza Feb 27 '13 at 5:58
1  
This is a CSS question, not a Drupal question :-) –  Chapabu Feb 27 '13 at 10:10
    
@Chapabu How to actually style the image to be used as a background is a CSS question, but the image needs to be uploaded and rendered as well on a Drupal site, which will require some Drupal code or similar to get this functionality. This is not a pure CSS question. –  googletorp Feb 27 '13 at 12:48
    
@googletorp It doesn't say anywhere in the question that "the image needs to be uploaded and rendered". With all due respect (you guys do a cracking job), I think I'm going to have to disagree on this one. I have added my answer anyway just in case this stays open :) –  Chapabu Feb 27 '13 at 13:55
    
Agree with @Chapabu, this can't be answered without referencing CSS background stretching techniques. Otherwise the question should be "how do I upload/render CSS/images files in Drupal?", and would be too vague anyway –  Clive Feb 27 '13 at 14:09

3 Answers 3

up vote 1 down vote accepted

Sounds like you are looking for something along the lines of the Backstretch module.

share|improve this answer
    
Just what i was looking for. I know its just a CSS question, but my clients would have no idea of how to code CSS. which is why i need a simple module for them to change the background easily. Thanks for this! –  duckx Feb 27 '13 at 17:52

I think you are looking for something like this

bg image module

or maybe this can help you noggin module

There is also the other option of using Fusion and then integrate the background picture to the body accordingly to Fusion

share|improve this answer

You don't need any modules - this is basic CSS.

Just upload the background image to your theme's images directory (or wherever you choose to store your images) and apply the following:

body {
  background-image: url("path/to/your/background/image.jpg");
  background-position: fixed;
  background-size: 100% 100%; /*You have to declare H/W, it doesn't appear to be inherited*/
  background-repeat: no-repeat; /*Just in case*/
}

Source: CSS Info - Background size

Support/compatibility: caniuse.com - Background size

IE 6-8 Polyfill: You can use jquery.backgroundSize.js to add functionality in IE6-8.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.