Total n00b question involving div tags.
-
I want to drop out the “featured” and “middle” divs, making the “headline” flush with the sidebar and placing a space between “headline” and “bottom.” I’ve tried multiple variations, but I can’t get the headline flush with the sidebar and its background keeps bleeding into the bottom feed. I’m sure it’s an easy fix.
How should this be formatted?
Any help would be appreciated.
`<?php get_header(); ?>
<?php if(!is_paged()) { ?>
<div id=”top” class=”clearfloat”>
<div id=”headline”>
<?php include (ABSPATH . ‘/wp-content/plugins/content-gallery/gallery.php’); ?>
<p>
<b>Most Popular</b> | <b>Recent Reviews</b>– list content
– list content
– list content
– list content</div>
<div id=”featured”>
<img src=”<?php echo get_option(‘home’); ?>/wp-content/themes/arthemia/images/featured.png” width=”72px” height=”17px” alt=”” />
<?php query_posts(“showposts=4&category_name=Featured”); $i = 1; ?><?php while (have_posts()) : the_post(); ?>
<div class=”clearfloat”>
<?php $values = get_post_custom_values(“Image”);
if (isset($values[0])) { ?>
” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”>
<img src=”<?php echo bloginfo(‘template_url’); ?>/scripts/timthumb.php?src=<?php echo get_option(‘home’); ?>/<?php
$values = get_post_custom_values(“Image”); echo $values[0]; ?>&w=100&h=65&zc=1&q=100″
alt=”<?php the_title(); ?>” class=”left” width=”100px” height=”65px” />
<?php } ?>
<div class=”info”>” rel=”bookmark” class=”title”><?php the_title(); ?>
<?php the_excerpt(); ?>
</div>
</div><?php endwhile; ?>
</div>
</div>
<div id=”middle” class=”clearfloat”>
<img src=”<?php echo get_option(‘home’); ?>/wp-content/themes/arthemia/images/category.png” class=”clearfloat” alt=”” />
<?php $display_categories = array(5,56,7,8,11); $i = 1;
foreach ($display_categories as $category) { ?><div id=”cat-<?php echo $i; ?>” class=”category”>
<?php query_posts(“showposts=1&cat=$category”)?>
<span class=”cat_title”>“><?php single_cat_title(); ?></span>
“><?php echo category_description($category); ?>
</div><?php $i++; ?>
<?php } ?></div>
<?php } ?>
<div id=”bottom” class=”clearfloat”>
<div id=”front-list”>
<?php
$page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
query_posts(“cat=-161,-130,-166&paged=$page&posts_per_page=5”); ?><?php while (have_posts()) : the_post(); ?>
<div class=”clearfloat”>
<h3 class=cat_title><?php the_category(‘, ‘); ?> »</h3>
<div class=”title”>” rel=”bookmark”><?php the_title(); ?></div>
<div class=”meta”>[<?php the_time(‘j M Y’) ?> | <?php comments_popup_link(‘No Comment’, ‘One Comment’, ‘% Comments’);?> | <?php if(function_exists(‘the_views’)) { the_views(); } ?>]</div><div class=”spoiler”>
<?php $values = get_post_custom_values(“Image”);
if (isset($values[0])) { ?>
” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”>
<img src=”<?php echo bloginfo(‘template_url’); ?>/scripts/timthumb.php?src=<?php echo get_option(‘home’); ?>/<?php
$values = get_post_custom_values(“Image”); echo $values[0]; ?>&w=150&h=150&zc=1&q=100″
alt=”<?php the_title(); ?>” class=”left” width=”150px” height=”150px” />
<?php } ?><?php the_excerpt(); ?>
</div>
</div>
<?php endwhile; ?>
<div class=”navigation”>
<?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); }
else { ?><div class=”right”><?php next_posts_link(‘Next Page »’) ?></div>
<div class=”left”><?php previous_posts_link(‘« Previous Page’) ?></div>
<?php } ?>
</div>
</div><?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>’
Visual reference: http://tinypic.com/view.php?pic=2m6vjfs&s=4
- The topic ‘Total n00b question involving div tags.’ is closed to new replies.