The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Add border around whole page (8 posts)

  1. lesduffy
    Posted 7 years ago #

    This question is not about MY personal blog, but rather about someone else's of which I have been given the pleasure of maintaining/updating. I have put a thin (1px) dark grey border around the main page, which was easy to do. On that page are articles, and when you click on the header, it takes you to a separate page dedicated to that particular article. Now, on those pages, the border doesn't appear. I want it to appear on every page, and I've looked through all of the CSS and other pages, and I can't find how to do this.

    The guy has a password on the blog, so only select people (people in his group) can view it. I can't get permission to post the password, so I took a couple of screenshots.

    http://lesduffy.com/images/1.png (showing the grey border)
    http://lesduffy.com/images/2.png (no border)

    Here's the address for his blog, even though you can't really see anything without the password: http://www.highachieving.com/blog/

    Thanks for any help you can give.

  2. nerdanita
    Posted 7 years ago #

    Did you check in the page.php file, in your theme directory, if that class that you create it's being applied to the container div?

  3. lesduffy
    Posted 7 years ago #

    Well, here's the code in the page.php file:

    <?php get_header(); ?><?php get_sidebar(); ?>
    <div id="content">
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <h1><?php the_title(); ?></a></h1>
    <?php the_content("<p>__('Read the rest of this page &raquo;')</p>"); ?>
    <?php edit_post_link(__('Edit'), '<p>', '</p>'); ?>
    <?php endwhile; endif; ?>
    <?php get_footer(); ?>

    In the style.css file, here's the code for the container where I make the grey border appear (with the border: 1px solid #AAAAAA; code):

    #container {
    	width: 759px;
    	margin: 0 auto;
    	text-align: left;
    	padding-top: 0px;
    border: 1px solid #AAAAAA;

    Thanks for any help you can provide.

  4. lesduffy
    Posted 7 years ago #

    I tried editing the style.css file also to add the border code to the #content section:

    #content {
    	padding: 5px;
    	line-height: 18pt;
    	float: left;
        width: 510px;
    	font-family: 'times new roman';
    	font-size: 14pt;
    border: 1px solid #AAAAAA;

    ...to no avail.

  5. lesduffy
    Posted 7 years ago #

    Any response on this? :(

  6. John
    Posted 7 years ago #

    You're going to have to provide more info. Post the code of your header.php, footer.php and index.php. It may have something to do with a missing </div> somewhere.

    Check your pages (not only the Pages) using the Markup Validation Service @ http://validator.w3.org/
    and the CSS Validation Service @ http://jigsaw.w3.org/css-validator/
    this may bring the issue to light.

  7. nerdanita
    Posted 7 years ago #

    I can't help if I can't see the website. :S

  8. lesduffy
    Posted 7 years ago #

    I managed to figure it out. I had to add <div id="container"> near the top of single.php with a closing div statement. Thanks :)

Topic Closed

This topic has been closed to new replies.

About this Topic