Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can you see what's happening with this code?

Discussion in 'Website Coding & Programming Forum:' started by Jonna Healey, Apr 24, 2014.

  1. Jonna Healey

    Jonna Healey Member

    I'm trying to work out why this code isn't working properly. I've added a container around a DIV, but now my 'tab' selection isn't working. I've messed with the z-index but must be missing something.

    The code looks like this:

    <div id="fullwidthcontainersub">
    <section id="content" role="main">
    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

    <div class="entry-content">
    <?php the_content(); ?>
    <?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'boilerplate' ), 'after' => '' ) ); ?>
    <?php edit_post_link( __( 'Edit', 'boilerplate' ), '', '' ); ?>
    </div><!-- .entry-content -->
    </article><!-- #post-## -->
    <?php endwhile; ?>
    You can see what I'm doing here. It's built with WP obviously.

    Any ideas?
  2. Tony Hardy

    Tony Hardy Guest

    If you structure it so the

    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    Falls before <section id="content"> etc, and ends after </section> how does that effect it? I know it'll mess up the width and things, but does it work?

    Or, have you tried pasting the code elsewhere and seeing whether it works on it's own?
    Lata Joshi likes this.
  3. Lata Joshi

    Lata Joshi New Member

    I think this not a good formate you are using. You should create div inside the section.
  4. HippySunshine

    HippySunshine Senior Member

    I also thought div should be inside section...?

Share This Page