Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2012
    Posts
    19
    Thanks
    7
    Thanked 0 Times in 0 Posts

    how to remove background image in css

    Hi
    I am trying to remove the background image from a template that i downloaded.
    Here is what i suspect needs to be changed:
    Code:
    body {background:url(../images/bg_img.jpg) top center no-repeat #000;border:0;font:13px Arial, Helvetica, sans-serif;color:#3a3a3a;line-height:20px;min-width:980px;text-align:justify;padding:10px 0}

    how do I remove the background without messing anything else up?
    I tried deleting the bg_img.jpg file, and that worked, but is there a more legit way of doing it?
    Last edited by mike316; 05-14-2012 at 03:06 AM.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Change
    Code:
    background:url(../images/bg_img.jpg) top center no-repeat #000;
    to
    Code:
    background: #000;
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    mike316 (05-14-2012)

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,748
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello mike316,
    That line is the shorthand for 3 different background properties, image/color/position. Have a look at background shorthand here.

    Here the regular background properties are described.

    And, of course, _Aerospace_Eng_'s suggestion fixes your problem.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •