Results 1 to 5 of 5

Thread: CSS : Changing background image and length of a page to 100%

  1. #1
    Join Date
    May 2008
    Posts
    191

    CSS : Changing background image and length of a page to 100%

    Hello,

    I have half an image background on my site
    But the image does not display all ... how to please
    Depending on the screen that the image I'd like to take all the screen Thanks!

    Here is what I have in my mid template_css:

    Code:
    body ( 
    margin: 15px; 
    height: 100%; 
    padding: 0px; 
    font-family: Arial, Helvetica, Sans Serif; 
    line-height: 120%; 
    font-size: 11px; 
    color: # 38,081th; / * Color main text * / 
    background: url (.. / images / fond.jpg) no-repeat; 
    
    )

  2. #2
    Join Date
    May 2008
    Posts
    376

    Re: Changing background image and length of a page

    I think, this is bit complicated, in fact it is an image and it has fixed size ............ impossible

    The only way it seems to me to be a script that detects the size of the screen of the visitor and then a function that does not envy the same image depending on the size of the screen (an image for each different size of screen)

  3. #3
    Join Date
    May 2008
    Posts
    249

    Re: Changing background image and length of a page

    hello,

    Indeed, there is the javascript code to insert.

    otherwise, it is possible to repeat the display of the image width and height.

  4. #4
    Join Date
    May 2008
    Posts
    376

    Re: Changing background image and length of a page

    Quote Originally Posted by Mac-Imagery View Post
    hello,

    Indeed, there is the javascript code to insert.

    otherwise, it is possible to repeat the display of the image width and height.
    but given the size of the image and the original reason this might not be beautiful would require a smaller image which does not repeat the site
    in this case

    Code:
      background: url (.. / images / fond.jpg);  
      background-repeat: repeat;

  5. #5
    Join Date
    May 2008
    Posts
    335

    Re: Changing background image and length of a page to 100%

    There are many more resolutions than this (not taking into account the Wide screen and very large resolutions, which are rare but poorly accepted default display). It is not a solution to test the resolution.

    I see 2 solutions:

    1 - do not use a background-image but an image that you put in width and height to 100% (in a 100% body height in history to avoid IE bug)

    - Put the rest of your site in a div with position: absolute above.
    This solution is not very complicated to implement. Perhaps some IE bug to manage. But above all, his biggest problem is that an image stretched by a browser is not very pretty.

    2 - If it is you who made this picture and that you have the sources, a better solution is to substantially the same as for a div with rounded corners:

    - Create an image that you provide a reason for the background that can be repeated without being ugly. It does not include the 4 photos that you have placed at 4 corners.

    - Create 4 images (gif it will be easier than png-24, but you will have a color that is clipping in the shade of the background) from the 4 photos with a background (= edges) transparent.

    - In your template (index.php), you place a div with your pattern background image is repeated in 2 directions.

    - In this div, you place it as 4 other div which are each time with each other. They will each have an image in the background photo-image that will not be repeated and will be positioned in one corner.

    - You define these divs and your body with a height of 100%.

    - If you are forced to use the PNG-24 for transparent photos will require that you met up a solution for non-support for this format by IE6 and earlier.

    - Simply, align your background image to the top of the page and the problem will get resolved.

Similar Threads

  1. Changing Desktop background problems in Mountain Lion
    By Yoteen in forum Operating Systems
    Replies: 8
    Last Post: 18-08-2012, 01:27 PM
  2. Replies: 5
    Last Post: 03-12-2010, 11:29 PM
  3. Replies: 5
    Last Post: 26-08-2010, 05:57 AM
  4. Blocksize does not correspond to the image length
    By fastrod in forum Windows Software
    Replies: 2
    Last Post: 11-08-2009, 11:02 AM
  5. changing the DOS background colour
    By Itronix in forum Tips & Tweaks
    Replies: 1
    Last Post: 05-01-2009, 05:32 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,599,857.13435 seconds with 16 queries