Unable to use custom div…
-
So I’ve created a custom template for a blog page on my site, and I made a new div #blogposts, as I want the blogposts in a different position from the content on the static home page.
Here is the revelant HTML from the blog page template:
<div id=”blogposts”>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class=”post” id=”post-<?php the_ID(); ?>”>
<h2><?php the_title(); ?></h2><div class=”entry”>
<?php the_content(‘<p class=”serif”>’ . __(‘Read the rest of this page »’, ‘myelectrician’) . ‘</p>’); ?><?php wp_link_pages(array(‘before’ => ‘<p>‘ . __(‘Pages:’, ‘myelectrician’) . ‘ ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>
</div>
When I make changes to .narrowcolumn the changes occur on the page, but when I make changes to #blogposts, nothing occurs. Here is the CSS:
#blogposts {
float: left;
padding: 0 0 0 0px;
margin-left: 50px;
margin-top: 0px;
width: 1200px;
border: 1px solid;
}.narrowcolumn {
float: left;
padding: 0 0 0px 0px;
margin-left:75px;
margin-top: 145px;
width: 1200px;
border: 1px solid;}
The topic ‘Unable to use custom div…’ is closed to new replies.