Css background image

contact_ankit61189

New Member
Messages
1
Reaction score
0
Points
0
Css background image is not working
background-image:url(pic/a.jpg);
i have a folder name pic in my www folder..
plz help.
 

techairlines

x10 Flyer
Community Support
Messages
2,867
Reaction score
165
Points
63
Hello.

Is your CSS placed directly in the HTML or with an external stylesheet?

If your stylesheet is in domain/css/general.css, then that background image would look for domain/css/pic/a.jpg. Add a slash in front of pic so it looks for the image from your site's root domain.

Otherwise, make sure the file exists and the case is correct. Linux is case sensitive.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
It would also help if you would give a link to the page with the problem.

Sometimes the problem is as simple as a typo.
 

mpldev

New Member
Messages
4
Reaction score
0
Points
0
Hi. You can use this :

background-image:url("mypix.jpg");

So, if you want the image to be repeated, you can use :

background-repeat:repeat-x; // x axis
background-repeat:repeat-y; // y axis
background-repeat:repeat; // x and y axis
background-repeat:no-repeat; // neither x axis nor y axis

I hope this will help you.

Bye.

Greg.
 
Top