Background image on a site
hello people.
I have a site in progress but I would have a background image that vision adjusts to the width and height of the people their screen.
so that my image full browser takes.
I have to css code but it does not allow this
Cascading Style Sheet:
Quote:
body (
background-image: url (background.gif);
background-repeat: no-repeat;
position: absolute;
height: 100%;
width: 100%;
margin: 0;
padding: 0;
)
or should I do that with javascript?
please tell me thank you.
Re: Background image on a site
not sure but 2nd line change even this:
background-repeat: repeat;
A background image can not dimensions passing through CSS, so do not adjust to the resolution.
Re: Background image on a site
I recommend to use a pattern instead of an image, though this does not answer your question.
If you have demonstrated how it would need would be useful on tips.
Re: Background image on a site
Best way is probably an img tag in the background to levitate (using z-index), these 100% height and width to and fixed positioning.This is possible with CSS3. This is already supported by Safari, Opera and other WebKit-based browsers
Re: Background image on a site
ok I have a put the CSS code that use:
Cascading Style Sheet:
Now I see that they are indeed only an image with height and width to 100% in the code already.