WordPress.org

Ready to get started?Download WordPress

Forums

content aligns underneath sidebar-widgets (5 posts)

  1. baumbabum
    Member
    Posted 3 years ago #

    Hello everybody,

    I'm creating a homepage with different sidebars on different pages. I now have the problem, that on this page the content of the main text-area aligns underneath the content of the sidebar.
    It probably is because of my page-template- or sidebar-file, right?
    I don't really know what I did, so I'm a bit lost...
    I would really appreciate yopur help!

    the code of my sidebar-file:

    <?php
    /**
     * @package WordPress
     * @subpackage Coraline
     * @since Coraline 1.0
     */
    ?>
    <div id="sidebar-3" class="sidebar-content" role="complementary">
    <div id="primary" class="widget-area" role="complementary">
    <ul class="xoxo">
    <?php
    	if ( ! dynamic_sidebar( 'secondary-widget-area' ) ) : ?>
    
    			<li id="nav_menu-3" class="widget-container widget_nav_menu">
    				<h3 class="widget-title"><?php _e( 'Unsere Projekte', 'coraline' ); ?></h3>
    </li>
    <?php endif; // end secondary widget area ?>
    </ul>
    </div><!-- #primary .widget-area -->
    </div>

    and this is the template:

    <?php
    /**
     * Template Name: submenu-page
     * @package WordPress
     * @subpackage Coraline
     * @since Coraline 1.0
     */
    
    get_header(); ?>
    <?php get_sidebar('3'); ?>
    
    		<div id="container" class="sidebar-content">
    			<div id="content" role="content-box">
    
    			<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    
    				<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    					<h1 class="entry-title" style="display: none;"><?php the_title(); ?></h1>
    					<div class="entry-content">
    						<?php the_content(); ?>
    						<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'coraline' ), 'after' => '</div>' ) ); ?>
    						<?php edit_post_link( __( 'Edit', 'coraline' ), '<span class="edit-link">', '</span>' ); ?>
    					</div><!-- .entry-content -->
    				</div><!-- #post-## -->
    
    				<?php if ( comments_open() ) comments_template( '', true ); ?>
    
    			<?php endwhile; ?>
    
    			</div><!-- #content -->
    		</div><!-- #content-container -->
    
    <?php get_footer(); ?>
  2. Tara
    Member
    Posted 3 years ago #

    star with sorting out the markup errors. Hopefully that resolve the issue.

  3. baumbabum
    Member
    Posted 3 years ago #

    Thank you so much!
    That's a good tool! I didn't really get it though.. On none of the php-files is a duplicate ID container. Does this come up because of wp putting pieces together?
    Also I don't really know what this means: "Bad value content-box for attribute role on element div."

    As you can see I'm really lost.. but willing to learn..

  4. Tara
    Member
    Posted 3 years ago #

    W3 gives you about 7 options to view the validation output. To better understand the output try using these options:

    View Source
    Clean up Markup with HTML Tidy

  5. baumbabum
    Member
    Posted 3 years ago #

    Okay..
    I checked this but it didn't really bring me forward. When i check any other page on my site (without sidebars) which are based on the original full-width-paghe.php / loop.php (not modified) of the coraline theme, it brings up the same errors. so i suppose that's not the problem.
    thanks anyway.
    Do you or anybody else have any other ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic