WordPress.org

Ready to get started?Download WordPress

Forums

I added a gradient border to main page of 2010, but it isnt showing up on other (11 posts)

  1. JohnnyScience
    Member
    Posted 3 years ago #

    I am working on a website for a client & having a bit of an issue with a gradient border I added spanning the entire website. Right now it is just showing up on the main page.

    I am using WordPress theme 2010

    As you can see here, there is a gradient border on the sides:

    http://visionaryresearchchems.com/

    but if you check on any other page that was created, it does not show up?

    http://visionaryresearchchems.com/?page_id=2

    http://visionaryresearchchems.com/?page_id=44

    What do I need to add code to so that this gradient border will show on all pages?

    Thanks.

  2. jrav001
    Member
    Posted 3 years ago #

    You don't have an #innerWrap on you other template files.

  3. JohnnyScience
    Member
    Posted 3 years ago #

    That was the thing, I guess I didn't know exactly which other template files I needed to add the #innerwrap to in order for it to show up on other pages.

    Which ones specifically do I need to add that to?

    Thanks.

  4. JohnnyScience
    Member
    Posted 3 years ago #

    Bump...

  5. JohnnyScience
    Member
    Posted 3 years ago #

    Still stuck on what other templates need to be edited so this gradient shows up on all new created pages?

    Thanks.

  6. marjiec
    Member
    Posted 3 years ago #

    You have innerwrap and outerwrap in the wrong location. They need to be removed because they are above the doctype. They aren't even inside the proper html tags. Look for them in your header.php. After you do that I should be able to help with your gradient.
    Why not put the gradient in the body tag using just css? No need for the image.

  7. JohnnyScience
    Member
    Posted 3 years ago #

    I was working with someone from codingforums.com & that was how they suggested to do it. We edited index.php and the way we did it seemed to be the only way it would work.

    There doesnt seem to be any body tags inside of index.php:

    [code]<div id="outerWrap">
    <div id="innerWrap">

    <?php
    /**
    * The main template file.
    *
    * This is the most generic template file in a WordPress theme
    * and one of the two required files for a theme (the other being style.css).
    * It is used to display a page when nothing more specific matches a query.
    * E.g., it puts together the home page when no home.php file exists.
    * Learn more: http://codex.wordpress.org/Template_Hierarchy
    *
    * @package WordPress
    * @subpackage Twenty_Ten
    * @since Twenty Ten 1.0
    */

    get_header(); ?>

    <div id="container">
    <div id="content" role="main">

    <?php
    /* Run the loop to output the posts.
    * If you want to overload this in a child theme then include a file
    * called loop-index.php and that will be used instead.
    */
    get_template_part( 'loop', 'index' );
    ?>
    </div><!-- #content -->
    </div><!-- #container -->

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    </div><!--end innerWrap-->
    </div><!--end outerWrap-->[/code]

    Also, we used CSS to add the gradient:

    [code]#outerWrap {
    width: 1000px;
    margin: auto;
    background: url(http://visionaryresearchchems.com/wp-content/uploads/2011/01/blueleft.png) repeat-y left;
    }
    #innerWrap {
    width: 1024px;
    background: url(http://visionaryresearchchems.com/wp-content/uploads/2011/01/blueright.png) repeat-y right;
    }[/code]

    So what exactly is wrong with the way we did it?

    What other PHP file do I edit so this gradient shows on all pages? (Remember, all 2010 files seem to be PHP, not HTML, so I'm not seeing any BODY tags to edit?)

  8. marjiec
    Member
    Posted 3 years ago #

    You don't edit body tags, you edit css.
    You created code errors by putting html above the header.php
    That is not the reason it doesn't work on all pages. It is css that will do that for you and you do have to edit all the proper css to do it.
    You will need to remove the code above the doctype.
    But, if you are OK with code errors you are fine. Don't expect it to work right all the time and in all browsers.

  9. suzanne.earley
    Member
    Posted 3 years ago #

    The opening body tag is actually in the header.php file, which is called by the getheader function in index.php

    (The closing tags for the body and html are in footer.php)

  10. JohnnyScience
    Member
    Posted 3 years ago #

    Ok, so right now I obviously have add this for HTML:

    <div id="outerWrap">
    <div id="innerWrap">

    Am I going to want to use the same HTML for editing the header instead? Or something completely different?

    If not, exactly what should I be adding to the header.php (And where)

    And what should I be adding to the body tag of CSS?

    This is the CSS I have added for the index.php

    [code]#outerWrap {
    width: 1000px;
    margin: auto;
    background: url(http://visionaryresearchchems.com/wp-content/uploads/2011/01/blueleft.png) repeat-y left;
    }
    #innerWrap {
    width: 1024px;
    background: url(http://visionaryresearchchems.com/wp-content/uploads/2011/01/blueright.png) repeat-y right;
    }[/code]

    So will I need to transfer some of this over to the body tag so that the gradient border lays outside of the main column like it is now?

  11. JohnnyScience
    Member
    Posted 3 years ago #

    So If I just add these two image URLs to the CSS #body tag, & what would I then want to do, give negative/positive margin to then fan/push them out on the sides of the webpage as they curently are?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.