Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 20-05-2009
Member
 
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; 

)
Reply With Quote
  #2  
Old 20-05-2009
Member
 
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)
Reply With Quote
  #3  
Old 20-05-2009
Member
 
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.
Reply With Quote
  #4  
Old 20-05-2009
Member
 
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;
Reply With Quote
  #5  
Old 20-05-2009
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "CSS : Changing background image and length of a page to 100%"
Thread Thread Starter Forum Replies Last Post
Changing Desktop background problems in Mountain Lion Yoteen Operating Systems 8 18-08-2012 01:27 PM
Picture position does not work while changing desktop background in personalization foraman Customize Desktop 5 03-12-2010 11:29 PM
Changing Login Background Image on Windows 7 Starter Edition Indulal Windows Software 5 26-08-2010 05:57 AM
Blocksize does not correspond to the image length fastrod Windows Software 2 11-08-2009 11:02 AM
changing the DOS background colour Itronix Tips & Tweaks 1 05-01-2009 05:32 PM


All times are GMT +5.5. The time now is 10:48 AM.