Forums

float left and right (9 posts)

  1. 24lover
    Member
    Posted 1 year ago #

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

    <p class="alignleft">>« Previous Page : <a href="http://www.vcestudyguides.com/guides/context/encountering-conflict">Encountering Conflict</a></p>
    <p class="alignright">Next Page :  <a href="http://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!

  2. Emil Uzelac
    Member
    Posted 1 year ago #

    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.

  3. 24lover
    Member
    Posted 1 year ago #

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

  4. Emil Uzelac
    Member
    Posted 1 year ago #

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

  5. 24lover
    Member
    Posted 1 year ago #

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

  6. Emil Uzelac
    Member
    Posted 1 year ago #

    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?

  7. 24lover
    Member
    Posted 1 year ago #

    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

  8. Emil Uzelac
    Member
    Posted 1 year ago #

    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 :)

  9. 24lover
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic