i'm working on a gallery in a wordpress site and am still learning. I'm trying to make previous/next links at the bottom of a picture post that when clicked will take the user to the previous or next image.
this is the css:
.previmgtxt {
position:absolute;
z-index:-1;
float:left;
width:110px;
height:110px;
color: #ffffff;
font-size: 30pt;
line-height: 22pt;
background-color: #000000;
padding: 20px;
}
.previmglink:hover {
opacity:.2;
filter:alpha(opacity=20);
}
and this is the html to go with it:
<div class="navigation">
<div class="alignleft"><div class="previmgtxt">PREV IOUS PIC</div><div class="previmglink"><?php previous_image_link() ?></div></div>
<div class="alignright"><div class="nextimgtxt">NEXT PIC</div><div class="previmglink"><?php next_image_link() ?></div></div>
</div>
it works perfectly except for on the very first photo where there is no previous photo it will still show the "PREVIOUS PHOTO" image since its in a separate div.
I need a php code (?) to make sure that when the post is on the first page (or when there is no 'previous' photo) then nothing shows up.
Hope i explained that well enough. if not, check out the site here: <snip>
and the problem here: <snip>
thanks in advance.
[edited by: dreamcatcher at 10:34 am (utc) on Mar 21, 2010]
[edit reason] no urls please, see T.O.S [/edit]