WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Twentyten: How to switch right sidebar to left? (9 posts)

  1. Repka
    Member
    Posted 4 years ago #

    How to switch right sidebar to left in "twentyten" theme?

  2. alchymyth
    Forum Moderator
    Posted 4 years ago #

    if this is meant for all pages, try to change the respective styles to:

    #primary, #secondary {
    float:left;
    clear:left;
    margin-left: 10px;
    }
    #container {
    float:right;margin-right:-260px;
    }

    or add these styles above at the end of style.css.

  3. Repka
    Member
    Posted 4 years ago #

    Now sidebar is under content :)
    Maybe content should also be shifted.

  4. alchymyth
    Forum Moderator
    Posted 4 years ago #

    you may have other modifications that are interfering;

    link to your site?

  5. Repka
    Member
    Posted 4 years ago #

    it's on denwer

  6. Repka
    Member
    Posted 4 years ago #

    Piece of default style.css code:

    #container {
    float: left;
    margin: 0 -240px 0 0;
    width: 100%;
    }
    #content {
    margin: 0 280px 0 20px;
    }
    #primary,
    #secondary {
    float: right;
    overflow: hidden;
    width: 220px;
    }
    #secondary {
    clear: right;
    }
    #footer {
    clear: both;
    width: 100%;
    }

  7. alchymyth
    Forum Moderator
    Posted 4 years ago #

    the default styles are the same in my TwentyTen 1.1 style.css;

    all i can say that the suggested change to the styles works in my version of the theme (online test-installation, unchanged theme);

    i am more than happy to look into your site and to try to find out what is dropping your sidebar; however, i can only do this if your site is live and if you post a link to your site where the problem can be seen.

  8. Repka
    Member
    Posted 4 years ago #

    Oh... I made it)) Thanks a lot, I'm a fool :D

  9. len7560
    Member
    Posted 4 years ago #

    If anyone else experiencing issues when moving the sidebar to the left (like the example above, where the sidebar moves below all content) here is a fix:

    Look for this code in style.css:

    #container {
    	float: left;
    	margin: 0 -240px 0 0;
    	width: 100%;
    }
    #content {
    	margin: 0 280px 0 20px;
    }
    #primary,
    #secondary {
    	float: right;
    	overflow: hidden;
    	width: 220px;
    }

    and replace it with the following:

    #container {
    	float:right;
    	margin-right:-260px;
            width: 100%;
    }
    
    #content {
    	margin: 0 280px 0 20px;
    }
    
    #primary, #secondary {
    float:left;
    clear:left;
    margin-left: 10px;
    }

    What causes the sidebar to fix itself and align left instead of below all content is leaving this line as a container style:

    width: 100%;

    Hope that helps.

Topic Closed

This topic has been closed to new replies.

About this Topic