• I’m having trouble getting my website to stay within the container div that I’ve created with the “glass” effect. It has no problem staying put in Chrome & Firefox but when it comes to ANY version of iE, it just aligns to left.

    I’ve tried everything but it seems the only thing that will solve this problem is to remove the <?php the_content(); ?> from the html.

    I’ve also tried pulling the content of the blogs posts via:

    <?php
        $args = array( 'numberposts' => 6, 'post_status'=>"publish",'post_type'=>"post",'orderby'=>"post_date");
        $postslist = get_posts( $args );
    
        foreach ($postslist as $post) : setup_postdata($post); ?>
           <div class="events">
                 <p><strong><?php the_date(); ?></strong></p>
               <p><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></p>
               <p><?php the_content(); ?></p>
          </div>
    <?php endforeach; ?>

    And having:
    <?php require('wordpress/wp-blog-header.php');?>
    in my header.

    Could someone please help my! I’m completely lost.

    [Website URL: http://bfatest.site90.com/blog%5D

    This is a free hosting version of the website i’m using while testing the site.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Buryifa

    (@buryifa)

    TEMPLATE FOR THAT PAGE
    Please let me know if there’s an easier way for you all to see this.

    <!DOCTYPE html>
    
    <!--Start Old-->
    
    <?php 
    
    /*
    	Template Name:Blog
    */
    
    /*
    	The Blog Page
    	A template for the Blog Page created by Max Hamblett for Bury Financial Advisers Ltd.
    	Version: 1.0
    	"You cannot keep out of trouble by spending more than you earn." - Abraham Lincoln
    */
    
    /* Header call. */
    
    	get_header(); 
    
    /* End header. */	
    
    /* Define global variables. */
    	global $options, $post, $themeslug;
    	$page_section_order = get_post_meta($post->ID, $themeslug.'_page_section_order' , true);
    	if(!$page_section_order) {
    		$page_section_order = 'breadcrumbs,page_section';
    	}
    
    /* End define global variables. */?>
    <!--[if lt IE 9]>
    <script type="text/javascript">
      document.createElement("header");
      document.createElement("nav");
      document.createElement("section");
      document.createElement("article");
      document.createElement("aside");
      document.createElement("footer");
    <![endif]-->
    <div id="fixedglasstop"><!--Start New Container-->
    <!--Needs Content?--></br>
    </br>
    </div>
    <div id="fixedglass" style="height:auto"><!--Start New Container-->
    <div class="container"style="height:auto">
    
    	<div class="row"> 
    
    	<!--Begin @Core before page content hook-->
    		<?php synapse_before_page_content(); ?>
    	<!--End @Core before page content hook-->
    
    		<?php
    			foreach(explode(",", $page_section_order) as $key) {
    				$fn = 'synapse_' . $key;
    				if(function_exists($fn)) {
    					call_user_func_array($fn, array());
    				}
    			}
    		?>	
    
            <!--START BLOG CONTENT-->
    <?php
    			$args = array( 'numberposts' => 10 );
    					$postslist = get_posts( $args );
    				foreach ($postslist as $post) :  setup_postdata($post); ?> 
    
    	  <div class="widget-container">
    	 	<h2 class="widget-title" style="text-align:center"><?php the_time('F j, Y'); ?> - <?php the_time(); ?></h2>
    						<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4> Author: <a href="<? the_author_link(); ?>"><?php the_author(); ?></a>
                     <span style="width:800"></br><?php the_content(); ?></span>
    
    		    </div>
    		<?php endforeach; ?>
    
            <!--END BLOG CONTENT-->
    
            <!--STARTTEST-->
    
            <!--ENDTEST-->
    
    	<!--Begin @Core after page content hook-->
    		<?php synapse_after_page_content(); ?>
    	<!--End @Core after page content hook-->
    
    	</div><!--end row-->
    </div><!--end container-->
    </div><!--End New container-->
    <!--End Old-->
    <?php get_footer(); ?>

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Apply text-align: center to the parent element, then text-align: left to the actual element.

    Specifically try adding

    #fixedglass {
     text-align: center;
    }
    
    #fixedglass .container {
     text-align: left;
    }

    Thread Starter Buryifa

    (@buryifa)

    Updated the CCS to the following:

    /* This is the fixedglass style <for div id="">
    Made by: Max Hamblett
    */
    
    #fixedglass {
    	text-align: center;
    	padding: 0;
    	width: 1050;
    	margin: 0;
    	background-colour: none;
    	background-image: url("http://bfatest.site90.com/wp-content/uploads/2012/06/iamabackground.png");
    	background-repeat: no-repeat;
    	background-position: top;
    	background-attachment: fixed;
    }
    #fixedglass .container {
     text-align: left;
    }
    
    #fixedglasstop {
    	padding: 0;
    	width: 1050;
    	height: 586;
    	margin: 0;
    	background-colour: none;
    	background-image: url("http://bfatest.site90.com/wp-content/uploads/2012/06/iamabackgroundtop.png");
    	background-repeat: no-repeat;
    	background-position: top;
    	background-attachment: scroll;
    }
    
    #customcontent1 {
    	margin-left: auto;
    	margin-right: auto;
    	width: 200px;
    	padding: 5px 15px 20px 15px;
    	border: 1px solid;
    	border-top: 1px solid #CCC;
    	border-left: 1px solid #CCC;
    	border-right: 1px solid #BBB;
    	border-bottom: 1px solid #BBB;
    	border-radius: 4px;
    	-moz-border-radius: 4px;
    	box-shadow:inset 0 0 2px #ccc;
    	background: #fff;
    	margin-bottom: 15px;
    }

    Seemed to stay in the correct position for a second then jump right back to the left and revert to the errors again.

    I’ve checked the validator with other pages in the website and they’ve all come back with errors but show up fine on iE.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I’ve checked the validator with other pages in the website and they’ve all come back with errors but show up fine on iE.

    Can you not then fix the errors only for the page with the problem?

    Thread Starter Buryifa

    (@buryifa)

    Working on the errors, it’s not the errors in the actual HTML, I believe it’s an error in the html generated by the php codes I’ve used, possibly the “the_content” php reference.

    Any more suggestions while I’m working on it?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Thread Starter Buryifa

    (@buryifa)

    I’ve tried fixing as many problems as I can and I’ve got it down to about 15 on the blog page, nothing so far has actually changed,

    I’ve also tried the CSS provided in the above comment, no luck, any other help?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Causing an Align to left’ is closed to new replies.