• Pardon the title, it’s ridiculously hard to phrase my problem briefly.

    As I understand things, “previous_post_link” and “next_post_link” calls for the links of the previous and next posts respectively, and returning the html code.

    My problem: the returned code is in the form
    <a href="(post address)"></a>.

    The link works fine, but the lack of a class like
    <a class="classname" href="blah blah"></a>
    makes it extremely difficult to change the display from the default “inline” to “block”.

    Basically what I want to do is make the next & previous links blocks that change color when hovered on by the cursor. Pretty much like the stuff you see in subtraction.com. Except instead of menu items, I’m talking about the next/previous links.

    I’ve tried the child selector, but it doesn’t seem to work. I’ve also tried using !important on the attributes in the child selector, and still it doesn’t work.

    Can anybody help me? I’d be very very appreciative of any assistance.

Viewing 1 replies (of 1 total)
  • <ul class="prevnext">
    <li class="prev"><?php previous_post_link();?></li>
    <li class="next"><?php next_post_link(); ?></li>
    </ul>
    .prevnext {
    	margin:20px 0;
    	padding:0;
    	text-align:center;
    }
    .prevnext li {
    	margin:0;
    	padding:0 10px;
    	display:inline;
    	list-style-image:none;
    	list-style:none;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘How do you give previous_post_link and next_post_link block display?’ is closed to new replies.