+ Reply to Thread
Results 1 to 5 of 5

Thread: Css background image

  1. #1
    contact_ankit61189 is offline x10Hosting Member contact_ankit61189 is an unknown quantity at this point
    Join Date
    May 2011
    Posts
    1

    Question Css background image

    Css background image is not working
    background-image:url(pic/a.jpg);
    i have a folder name pic in my www folder..
    plz help.

  2. #2
    techairlines's Avatar
    techairlines is offline x10 Flyer techairlines has much to be proud oftechairlines has much to be proud of
    Join Date
    Jul 2009
    Location
    New York City
    Posts
    2,853

    Re: Css background image

    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.
    Best regards,
    Brian Yang - TechAirlines


    How am I doing? Click the star button at the bottom left to rate this post. Thanks.
    Terms of Service | Account Portal | Wiki

  3. #3
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Css background image

    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.
    Nothing is always absolutely so.

  4. #4
    htcuong.kbc45 is offline x10Hosting Member htcuong.kbc45 is an unknown quantity at this point
    Join Date
    May 2011
    Posts
    6

    Re: Css background image

    you shound use: background: url("../your folder/your file's name") no-repeat;

  5. #5
    mpldev is offline x10Hosting Member mpldev is an unknown quantity at this point
    Join Date
    Sep 2010
    Posts
    4

    Re: Css background image

    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.

+ Reply to Thread

Similar Threads

  1. CSS Background Image
    By rocky.mcarthur41 in forum Programming Help
    Replies: 6
    Last Post: 06-07-2010, 06:23 AM
  2. Preload background image
    By Awesomexr in forum Programming Help
    Replies: 4
    Last Post: 12-25-2009, 02:41 AM
  3. Stretching a background image?
    By WhiteOut in forum Programming Help
    Replies: 3
    Last Post: 03-28-2009, 11:37 PM
  4. Hmm background image help.
    By Matt. in forum Programming Help
    Replies: 3
    Last Post: 07-21-2008, 01:43 PM
  5. How do I set the background image to resize?
    By galaxyAbstractor in forum Graphics & Webdesign
    Replies: 2
    Last Post: 02-01-2008, 03:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers