modifying template for a static page
-
I am trying to create a static page with a slightly different look than my blog. I have managed to create a new page file and uploaded it to my site called “page1.php” I then created a new rule in my style sheet for “pgcontent”
my new file page looks like this:<?php
/*
Template Name: Page 1
*/
?><?php get_header(); ?>
<div id=”content”>
<div id=” pgcontent”>…
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(__(‘Read more’));?><?php endwhile; else: ?>
<p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p><?php endif; ?>
</div>
</div><!– The main column ends –>
I then added this new rule to my style sheet:
#pgcontent {
float: left;
width: 440px;
margin: 300px 20px 0px 0px;
padding: 0px 0px 0px 0px;
}
#contentmiddle {
float: left;
width: 440px;
margin: 0px 20px 0px 0px;
padding: 20px 20px 10px 20px;
}i cant seem to align the text in the middle of the page. I dont know if i should use the “”contentmiddle or the new “pgcontent” or if I have the margins wrong.
here is a link to the page:
https://www.aheadofthecurveatmidlife.com/test-product-page/?preview=trueany help would be greatly appreciated
- The topic ‘modifying template for a static page’ is closed to new replies.