WutWut
WutWut

Reputation: 1234

Align the sidebar to the main content of page

I am trying to create a website,but the sidebar is not aligning to the main content of the website and is overlapping another div. Link to the website http://www.inseeks.com/

screen shot of how it should look

Upvotes: 1

Views: 204

Answers (3)

Howli
Howli

Reputation: 12469

  • Remove the position: absolute; on .site-main .sidebar-container
  • Change width: 100%; to width: 300px;
  • Add float: right;

Add the following style to the css.

#primary 
{
    float: left;
}

That above should change so the sidebar will be on the left and no longer be overlapping the other content.

Upvotes: 0

rahul
rahul

Reputation: 774

    .site-main .sidebar-inner {
        margin: 6px auto;
        position: absolute;
        top: 0;
    }

Upvotes: 2

lxcky
lxcky

Reputation: 1668

Try placing your .sidebar-inner inside your #content

<div id="content" class="site-content" role="main">
    <div class="sidebar-inner">

Then float it to the right.

.sidebar-inner {
    float: right;
    //add necessary paddings or margins.
}

Upvotes: 0

Related Questions