Click here to Skip to main content
15,904,346 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello i have an external css file in asp.net. I wanted to use an image as a background.
i wrote background-image:url(name.jpg);But when i ran it in browser it was repeating all over it.so i tried background-image:no repeat;but then the image came in the corner.i want the same image covering full area of the browser.please help
Posted
Comments
ZurdoDev 31-Jul-13 13:04pm    
Perhaps you should post to jsfiddle.net so we can see what you are talking about. But be more clear on what you want. You said it repeated all over which you don't want but then you said you want it to cover the full area so what do you mean?
Karn Singh 31-Jul-13 13:21pm    
hey ryanb31: i want to set a single image as background so it covers full page in broswer.it should not repeat
ZurdoDev 31-Jul-13 13:43pm    
Do you mean to stretch it?
Karn Singh 31-Jul-13 13:44pm    
yeah yup i want to stretch it
Karn Singh 31-Jul-13 13:22pm    
i want to set an image as background so that it covers full page without repeating.thats what i meant

1 solution

I recently read this article that seemed to be talking about the same thing you're looking for.
Perfect Full Page Background Image
 
Share this answer
 
Comments
Karn Singh 31-Jul-13 13:23pm    
i want to set an image as background so that it covers full page without repeating.thats what i meant
Rick Plumer 31-Jul-13 13:25pm    
The article I linked gives a number of different solutions for doing just that. It should allow you to create a spanning background image using CSS3, CSS or JQuery.
Karn Singh 31-Jul-13 13:27pm    
thanks for the article but that is for css3.i want a solution in css as i am using visual studio 2010 and css3 is not supported.
Karn Singh 31-Jul-13 16:08pm    
thanks for the article..it is helpful.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900