Advertisement:

Author Topic: Add Sidebar to Item-post  (Read 1320 times)

m.elmasghouni

  • Newbie
  • *
  • Posts: 8
Add Sidebar to Item-post
« on: November 16, 2014, 12:56:50 am »
Hello everybody,

I need to add the home sidebar in Item post page, and I don't know how do this.  :-[

Thank you very much;
« Last Edit: November 16, 2014, 01:00:22 am by m.elmasghouni »

fog

  • Hero Member
  • *****
  • Posts: 1062
Re: Add Sidebar to Item-post
« Reply #1 on: November 16, 2014, 07:49:26 am »
Hi,
First, you need to know how html works, and CSS.
If you need an horizontal new parallel div to other, you need create a new div inside the div content, and for new div you need float him to right.
I don't know what theme you use, But this is an example for what you need  learn, if you really want know.

Por example:

<div class="content"> <!-- here is the all centered content -->
<div class="left">
<! all content of your publish page -->
</div>
<div class="right">
<!-- the new content for your new sidebar -->
</div>
</div>

Now the css part you need to know, or find for adapt it:
Example one:
.left{float:left;with:50%;}
.right{float:right;with:50%;}

Or example two:
Maybe it don't need this, but just in case, you need find the best solution for it result:

.left{float:left;with:50%;display:inline-block;}
.right{float:right;with:50%;display:inline-block;}

If you need swap the position of divs, you just need exchange the names the divs or (another example less common, just for you see how it works)
.left{float:right;}
.right{float:left;}

Now the part you need to do:

Copy the div "sidebar" of your main.php, something like "<div class="sidebar><!-- this is all the content sidebar--> </div>", and paste it on your item-post.php, inside the content div, and before the closed </div> of all content of your publish page. (the css part is already done in your style.css, unless it need a little change the width percentage of both divs, for adjustment).

If you dont know how to do it, tell what theme you use, and somebody can help you on it.

Greetings

m.elmasghouni

  • Newbie
  • *
  • Posts: 8
Re: Add Sidebar to Item-post
« Reply #2 on: November 16, 2014, 04:09:46 pm »
Thank you very much fog, I use Bender Theme.

m.elmasghouni

  • Newbie
  • *
  • Posts: 8
Re: Add Sidebar to Item-post
« Reply #3 on: January 05, 2015, 01:26:11 am »
Hello,

Someone to help me. I use Bender Theme.

Thank you;