Results 1 to 3 of 3
  1. #1
    Join Date
    May 2010
    Posts
    15
    Plugin Contributions
    0

    Default Css background img + background color

    Hi, I want a background img and also background color, because the background image is not that big, just half the page and then the rest is white color, but then i want same color as the background have at the bottom so it looks like they are connected, but how to do this, i know i have done this before...

    body {
    margin: 0;
    font-family: arial, helvetica, sans-serif;
    font-size: 0.72em;
    color: #333333;
    background: #000000;

    background: url("http://www.spacetelescope.org/static/images/background.jpg") repeat-x;
    line-height: 17px;
    }


    ^^ that how it looks in my css, but only the image is showing not the baground color i have choosed there, i also tried with background-color: #0000000 but that didnt work either, if i remove the image then its black #0000000 color at the background but not when i have image background 2, i want them both.... i have fresh install, nothing changed....

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Css background img + background color

    You're setting your background twice, so the second one replaces the first.

    When you had the color listed separately the same thing happened, since the "background" style replaces all the individual elements that preceded it such as background-color.

    You have two options:

    either use backround-color, background-image, etc to set each part separately

    OR

    combine them into a single statement such as
    background: #000000 url("http://www.spacetelescope.org/static/images/background.jpg") repeat-x;
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    May 2010
    Posts
    15
    Plugin Contributions
    0

    Default Re: Css background img + background color

    ahh yes now it worked!
    Thanks man, really appreciate it!

 

 

Similar Threads

  1. CSS background color change
    By bargincircus in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 19 Nov 2010, 12:22 PM
  2. product background color change CSS HELP!!!
    By moogvo in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 5 Nov 2009, 05:25 PM
  3. problem with changing background color in main css
    By Agent_KGB in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 13 Feb 2009, 04:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR