Rustyhands Posted January 10, 2011 Report Share Posted January 10, 2011 hi everyone I cant seem to center my content on my wordpress site????? Can anyone help please? heres the page <?php /* Template Name: About */ ?> <?php get_header(); ?> <!-- SPLASH --> <div id="splash"> <div id="splash_left"> <h2><?php the_title(); ?></h2> </div><!-- End OF SPLASH_LEFT --> <div id="splash_right"> <p><?php echo get_post_meta($post->ID, 'splash_right',true); ?></p> </div><!-- End OF SPLASH_RIGHT --> </div><!-- End OF SPLASH --> <!-- CONTENT_AREA --> <div id="content_area"> <div id="inner_content_left"> <!-- get the page content --> <?php if(have_posts()) : while(have_posts()) : the_post(); ?> <?php the_content(); ?> <?php endwhile; ?> <?php else: ?> <p>There are no posts to display. Try using the search.</p> <?php endif; ?> </div><!-- End OF INNER_CONTENT_LEFT --> </div><!-- End OF CONTACT_BOX --> </div><!-- End OF CONTENT_AREA --> </div><!-- END OF CENTER_COLUMN --> <?php get_footer(); ?> Quote Link to comment Share on other sites More sharing options...
Andrea Posted January 10, 2011 Report Share Posted January 10, 2011 http://www.csstutorial.net/2010/02/how-to-create-a-center-aligned-page-with-css/ Quote Link to comment Share on other sites More sharing options...
danhodge Posted January 10, 2011 Report Share Posted January 10, 2011 I dont know if this is a much too simple answer, and i know people dont tend to use html for things they can use CSS for, but... <center> </center> centers any text or media to my understanding Just if that link can't help you, i guess thats an alternative ;D Quote Link to comment Share on other sites More sharing options...
Andrea Posted January 10, 2011 Report Share Posted January 10, 2011 @ DanHodge: Is that HTML5? It's not anything valid in <5. Quote Link to comment Share on other sites More sharing options...
danhodge Posted January 10, 2011 Report Share Posted January 10, 2011 I have been using it for 2 or 3 months, so im not sure :| But it definatly works, and on every browser i think... Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 10, 2011 Report Share Posted January 10, 2011 @danhodge @andrea - The <center> tag may work, but it is deprecated and it is best to use CSS (text-align) to handle this instead. http://www.w3schools.com/TAGS/tag_center.asp Quote Link to comment Share on other sites More sharing options...
danhodge Posted January 10, 2011 Report Share Posted January 10, 2011 Oh i know, i was just mentioning it in case they need it as a last resort, as im guessing something could be colliding in the CSS for the website... Quote Link to comment Share on other sites More sharing options...
Andrea Posted January 10, 2011 Report Share Posted January 10, 2011 I thought <center> looked familiar. Dan, we don't generally recommend deprecated anything here - not even as a last resort. Quote Link to comment Share on other sites More sharing options...
danhodge Posted January 10, 2011 Report Share Posted January 10, 2011 I was thinking more of an alternative, but i understand what you mean Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.