• Hi everyone,
    I was wondering if you could help a beginner with this code:

    <p class="alignleft">>??Previous Page :?<a href="https://www.vcestudyguides.com/guides/context/encountering-conflict">Encountering Conflict</a></p>
    <p class="alignright">Next Page :??<a href="https://www.vcestudyguides.com/guides/context/encountering-conflict/additional-reading">Additional Reading</a> ?</p>
    </div>

    I am currently using this code however, I need to add the code for float left and float right respectively. Can you please show me how this is done?
    thank you very much!

Viewing 8 replies - 1 through 8 (of 8 total)
  • alignleft/alignright is usually used for WordPress images and I like to call Prev/Next with different names:

    Example:

    .nav-previous {
        float: left;
        width: 50%;
    }
    
    .nav-next {
        float: right;
        text-align: right;
        width: 50%;
    }

    This style is also use in WordPress TwentyTen theme.

    Thread Starter 24lover

    (@24lover)

    hi emil,
    how exactly am i supposed to add this into the code?
    thanks

    Go in your WP Dashboard > Appearance > Editor > style.css and add this code in your theme stylesheet.

    Thread Starter 24lover

    (@24lover)

    Hi Emil,
    I tried this but it didn’t work, any reason why?
    Thank you

    So you logged in to WordPress, located your style.css in your current theme and the code above did not work, correct? Do you mind sharing your site so that I can take a look?

    Thread Starter 24lover

    (@24lover)

    yes that’s right.

    Here are some codes that might be relevant

    .prenextlink .prenextlinkright{
    	float:right;
    }
    
    .prenextlink .prenextlinkleft{
    	float:left;
    
    }
    div#content-article .navigation { margin: 20px 0; border-top: 1px solid #ebebeb;}
    div#content-article .navigation .alignleft { float: left; }
    div#content-article .navigation .alignright { float: right; }

    there is no use in me showing you the site because the theme i’m using is hidden behind an ‘under construction theme’ unfortunately.

    thanks emil

    You already have this in:

    div#content-article .navigation .alignleft { float: left; }
    div#content-article .navigation .alignright { float: right; }

    and that should work just fine ??

    Thread Starter 24lover

    (@24lover)

    hmm….even though i have the code it doesn’t work….i wonder why ??
    my previous/next page code seems ok as well?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘float left and right’ is closed to new replies.