PDA

View Full Version : Image showing up in wrong location



PitbullMean
Feb 4th, 2010, 08:17 PM
http://foreverlock.ca/aoa2

I want to add a picture to the bottom of the page but its not the footer, its just something to make the layout look better, the top half of the image is faded so its semi transparent to blend in but when i put it in the theme with these attributes it just sticks to the top of the page. u can have a look right now cause its up there right now and heres the attributes i put


#dropfooter {
position: absolute;
vertical-align: bottom;
width: 901px;
height: 150px;
background: url("images/dropfooter.png") no-repeat 0 0;
}


and heres the main index page code where i put it.


<?php get_header(); ?>
<div id="main-wrapper">
<div id="left">
<?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>

<h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>

<div class="meta-data">
<span class="date"><span class="blue">Posted:</span> <?php the_time('d-m-Y | H:i:s'); ?></span>
<span class="category"><span class="blue">Category:</span> <?php the_category(', ') ?></span>
<span class="comments-no"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span>
</div>

<div class="entry">
<?php the_content('Continue reading &raquo;'); ?>
</div>

<?php endwhile; ?>

<div id="post-links">
<span class="prev-entries"><?php next_posts_link('Previous Entries') ?></span>
<span class="next-entries"><?php previous_posts_link('Next Entries') ?></span>
</div>

<?php else : ?>

<h2>Not Found</h2>
<p>Sorry, but you are looking for something that isn't here.</p>

<?php endif; ?>

</div>
<?php get_sidebar();?>

<div id="dropfooter"></div>
</div>

<?php get_footer(); ?>

abduraooft
Feb 5th, 2010, 07:53 AM
<div id="dropfooter"></div> I don't see that element in your page.
Anyway, to align an absolutely positioned element at the bottom(of its relatively positioned immediate parent), you need to use the CSS property bottom (along with a left or right value, as per the need)

PitbullMean
Feb 5th, 2010, 02:30 PM
Thanks for the insight man, I LOVE THIS FORUM!!