WordPress.org

Ready to get started?Download WordPress

Forums

Grid style theme help (10 posts)

  1. AM55
    Member
    Posted 1 year ago #

    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?

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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?

  3. AM55
    Member
    Posted 1 year ago #

    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.

  4. Dave
    Member
    Posted 1 year ago #

    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;
    }
  5. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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

  6. AM55
    Member
    Posted 1 year ago #

    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?

  7. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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;
  8. AM55
    Member
    Posted 1 year ago #

    <?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?

  9. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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;
  10. AM55
    Member
    Posted 1 year ago #

    Finally got there, thank you!!!

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.