WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] created child theme but widen column wont work (10 posts)

  1. robby1995
    Member
    Posted 1 year ago #

    i created a child theme and im trying to widen the column but for some reason its not working dont know if i made child theme wrong or some other problem, its probably something simple im only new to coding

    using twenty eleven theme

    here is the code can someone help?

    content-page.php

    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    	<header class="entry-header">
    		<!-- <h1 class="entry-title"><?php the_title(); ?></h1> -->
    	</header><!-- .entry-header -->
    	<div class="entry-content">
    		<?php the_content(); ?>
    		<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
    	</div><!-- .entry-content -->
    	<footer class="entry-meta">
    		<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
    	</footer><!-- .entry-meta -->
    </article><!-- #post-<?php the_ID(); ?> -->

    style.css

    /*
    Theme Name:     Robs child theme
    Theme URI:
    Description:    Robs Child Theme of Twenty Eleven
    Author:         rob
    Author URI:
    Template:       twentyeleven
    Version:        0.1.0
    */
    
    @import url("../twentyeleven/style.css");
    
    .one-column #page {
    	max-width: 1300px;
    }
  2. Julian
    Member
    Posted 1 year ago #

    I am not too familiar with twenty eleven but if you wish to increase the width of the entry content try adding this to your child theme. Again not too familiar with twenty eleven so if anyone else has another way please suggest it.

    .singular .entry-header,
    .singular .entry-content,
    .singular footer.entry-meta,
    .singular #comments-title {
    	margin: 0 auto;
    	width: 100%;
    }
  3. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    .one-column #page is only used if you selected the 'one-column' theme option;

    if the suggestion by @Julian does not help, please post a link to your site to illustrate the problem.

  4. robby1995
    Member
    Posted 1 year ago #

    i do have one column selected, this picture is what im trying to achieve -> picture

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

    that is the right style:

    .one-column #page {
    	max-width: 1300px;
    }

    make sure the child theme is activated;

    and remember to clear the browser cache after changes to the stylesheet, if you want to see the results.

  6. robby1995
    Member
    Posted 1 year ago #

    thanks heaps just needed to clear the cache

  7. Andrew Nevins
    Spam zapper & Volunteer Moderator
    Posted 1 year ago #

    Excellent work Robby1995, Alcymyth and Julian.

  8. Julian
    Member
    Posted 1 year ago #

    Thanks Andrew! Glad you got it working Robby1995. Good work Alcymyth! I got tired of clearing my cache every two seconds so typically now I just use inspect and style editor within Firefox. I recall that once I styled something and it wasn't coming up in IE so I used ctrl+shift+delete thinking I could clear the cache the same way I normally do in Firefox and Chrome. I spent a good 45 minutes or so going over the CSS until I finally figured out that the cache didn't clear. Really simple things can be frustrating.

  9. Andrew Nevins
    Spam zapper & Volunteer Moderator
    Posted 1 year ago #

    Just note some browsers deprecated ctrl + F5 caching capability. I distinctly remember pressing ctrl + F5 to clear cache in my old workplace and one day onwards it having no effect. Sorry, I can't be more specific. I always play it safe by clearing my cache through the settings.

  10. Julian
    Member
    Posted 1 year ago #

    Just note some browsers deprecated ctrl + F5 caching capability. I distinctly remember pressing ctrl + F5 to clear cache in my old workplace and one day onwards it having no effect. Sorry, I can't be more specific. I always play it safe by clearing my cache through the settings.

    If I played it safe by clearing the cache via the settings in IE I could've saved myself around 45 minutes. Haha. I think I may have ended up just clearing it from the Developer tools in IE9.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.