• Resolved budakhan01

    (@budakhan01)


    Hi, I’ve got a blog starting and I’m planning on altering the ‘Disconnect’ theme [www.askadamleague.com]. When going into the editor and changing the background color to an image, I get nothing. I’m hosting the image and I’ve even tried using some images that came with wordpress, but for some reason whenever I put an image in the color goes away and no image is apparent.
    I’ve tried this as well as others:
    body {
    margin:0;
    padding:0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9em;
    text-align:center;
    color:#29303B;
    line-height:1.3em;
    background:url(blue back.jpg);
    }
    Originally it was this and it works:
    body {
    margin:0;
    padding:0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9em;
    text-align:center;
    color:#29303B;
    line-height:1.3em;
    background: #0099FF;
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • general: background css
    https://www.w3schools.com/css/css_background.asp

    it depends where the image location is;

    here is another style with background image from the theme’s style.css:

    #rap
    {
    	background:#f2f2f2 url(img/rap2.jpg) center repeat-y;
    	width:760px;
    ....
    }

    in this example, the css file expects the background image to be in the /img folder of the theme;
    you can see how the color and other background properties are used here.

    Thread Starter budakhan01

    (@budakhan01)

    Thanks for your quick reply. I put my ‘blue back.jpg’ image in the #rap and it took away a bit of the border and not the background. The #body background color affects the background quite a bit and it is what I want to change.

    I already checked out the w3schools and tried modifying the background such as in the paper.gig example with the image that I’m hosting. No such luck.

    My CSS book says I should insert the image in the #wrap. This didn’t work either.

    Thread Starter budakhan01

    (@budakhan01)

    Got it!:
    body {
    margin:0;
    padding:0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9em;
    text-align:center;
    color:#29303B;
    line-height:1.3em;
    background-image:url(‘https://www.askadamleague.com/graphics/blue back.jpg’);
    }

    I’m such a noob. I didn’t know that I had to enter in the ENTIRE url for the image. Thanks very much for your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CSS background image won't work, color does though’ is closed to new replies.