WordPress.org

Support

Support » Themes and Templates » Grid style theme help

Grid style theme help

  • Hi,

    I want to add a background image to my theme, I am using http://www.dessign.net/gridstyletheme/.

    I have tried adding;

    background-image: url(images/170412.png);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: top center;}

    to Body in style.css but have had no joy.

    What am i doing wrong?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Michael

    @alchymyth

    Forum Moderator

    please post a link to your site to illustrate the problem.

    are you sure that the image is located where you point the css to?

    did you clear the browser cache after the changes to style.css?

    Sorry for the very late reply

    My site can be found here

    The image can be found here

    No I didn’t clear the cache, but I have done since and it still doesn’t work.

    I have also tried installing Background Control but had no joy.

    Dave

    @roseandmoon

    How did you upload your image?
    Is the path to the image correct?

    If so, try this:

    body {
    font-size: 12px;
    font-family: arial, verdana, georgia;
    background: transparent url(/images/170412.png) fixed center top no-repeat;
    }

    Moderator Michael

    @alchymyth

    Forum Moderator

    the location of the image would need to be here to be found by your background style:

    body { font-size: 12px; font-family: arial, verdana, georgia; 
    
    background-image: url(images/170412.png);
    ...

    but there is also this section in the head:

    <style>
    <!--
    body {background: transparent  ;}
    -->
    </style></head>
    <body>

    which would overwrite any body background styles in style.css.

    this:

    <!--
    body {background: transparent  ;}
    -->

    is a html comment, but does not comment the style, which is still applied;
    http://www.w3schools.com/css/css_syntax.asp

    I have now put the image in the correct folder.

    <style>
    <!--
    body {background: transparent  ;}
    -->
    </style></head>
    <body>

    Which file do I find this in to adjust it?

    Moderator Michael

    @alchymyth

    Forum Moderator

    Which file do I find this in to adjust it?

    if you can’t find it in header.php, then this is likely to come from a function or plugin.

    if you can’t locate it, try forcing your background styles by adding !important

    – example:

    background-image: url(images/170412.png)!important;
    <?php if(get_option($shortname.'_custom_background_color','') != "") { ?>
        <style type="text/css">
          body { background-color: <?php echo get_option($shortname.'_custom_background_color',''); ?>; }
        </style>
        <?php } ?>

    Is this it?

    Moderator Michael

    @alchymyth

    Forum Moderator

    looking at your site, the ‘offending’ output is gone; what is there is ouput by your latest posted code, and this is ok:

    <style type="text/css">
          body { background-color: transparent; }
        </style>

    no action needed.

    however, this:

    background-image: url(wp/wp-content/themes/gridstyletheme/images/170412.png) !important;

    should rather be:

    background-image: url(images/170412.png) !important;

    Finally got there, thank you!!!

    Now i just have to find a way to make my text stand out.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Grid style theme help’ is closed to new replies.