Reputation: 11
Thanks in advance for any help, I've been banging my head on the desk for a couple hours trying to figure this out, but I admit I'm bamboozled.
I have a navigation div:
<div class="projectNav clearfix">
<div class="previous <?php if(!get_previous_post()){ echo 'inactive'; }?>">
<?php previous_post_link('%link', '← %title'); ?>
</div>
<div class="next <?php if(!get_next_post()){ echo 'inactive'; }?>">
<?php next_post_link('%link', '%title →'); ?>
</div>
</div> <!-- end navigation -->
And these styles, sitting under a media query in the stylesheet.
.projectNav {
margin: 0 0 0 0;
padding-top: 10px;
float: none;
}
.projectNav div{
margin-left: 0px;
float: left;
{
.projectNav .next {
float: right !important;
{
.projectNav .previous {
float: left !important;
{
The first two styles are affecting the HTML nodes, but the last two never show up at all. I have to be able to select the 'previous' and 'next' elements to float them to either side of the page, but for the life of me I can't get the styles to work on them. I've tried changing the class name, giving them IDs, everything I could think of. Nothing. Does it have to do with the php in the class field?
Help!
Upvotes: 1
Views: 87
Reputation: 116180
The closing curly braces on the 2nd, 3rd nd 4th style are wrong:
.projectNav {
margin: 0 0 0 0;
padding-top: 10px;
float: none;
}
.projectNav div{
margin-left: 0px;
float: left;
} /* not { */
.projectNav .next {
float: right !important;
} /* not { */
.projectNav .previous {
float: left !important;
} /* not { */
Upvotes: 4