Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Sidebar display at the bottom of content

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #178484
    web_editor
    Participant

    Hi, I put left sidebar in my wordpress website but this left sidebar display after/at the bottom of the content instead beside of content. How can I do that? Thanks

    .sidebar ul{
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .sidebar ul li{
        border-bottom: 1px solid #F2F2F2;
        padding: 5px 0;
        line-height: 20px
    }
    
    .sidebar ul li:last-child{
        border-bottom: none;
    }
    
    .sidebar ul li a{
        color: #666;
    }
    
    .sidebar ul li a:hover{
        color:#01AEFD;
    }
    
    .sidebar h1.widget-title{
        background:#F1F2F3;
        border-left: 5px solid #F00000;
        font-size: 19px;
        text-transform: initial;
        padding: 8px 15px;
        line-height: 24px;
    }
    
    .sidebar .searchform{
        width: 100%;
            margin: 0;
    }
    
    .sidebar .searchform .s{
        width: calc(100% - 38px);
    }

    And here’s the other code of sidebar:

    .no-sidebar #primary{
        width: 100%;
        float: none;
    }
    
    .both-sidebar #primary{
        width: 72%;
        float: right;
    }
    
    .left-sidebar #primary{
        float: left;
    }
    
    .both-sidebar .sidebar{
        width: 20%;
    }
    
    .both-sidebar #primary-wrap .sidebar{
       width: 25.5%;
    }
    
    .sidebar{
        width: 26%;
    }
    
    .sidebar.right-sidebar{
        float: right;
    }
    
    .sidebar.left-sidebar{
        float: left;
    }
    #178485
    Chromawoods
    Participant

    You should provide some code that shows what you have right now.

    Perhaps the two columns are taking up more than 100% width, which would cause your sidebar to wrap down beneath the content? You might need to adjust some padding or margin or box-sizing, but hard to say without knowing what your HTML and CSS looks like. :/

    #178486
    web_editor
    Participant

    Hi sorry i forgot to display the sidebar code. Please see my post again

    #178488
    chrisburton
    Participant

    Do you have a live example, for example, a URL?

    #178489
    web_editor
    Participant

    Here the website that I currently using sidebar Sidebar problem

    #178490
    chrisburton
    Participant

    You have a width of 20% on the sidebar and 100% on the primary content area. You need to reduce the primary to 80% or lower.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.