Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

How to make a div sidebar?

I want to have a sidebar that is not a fixed sidebar.


Every time I try to float my sidebar to the left it goes to the left, except it stays underneath the div on top of it. Could anyone help me out?
(Mar 5, 2017 08:40 AM)Mik3y Wrote:  I want to have a sidebar that is not a fixed sidebar.
Every time I try to float my sidebar to the left it goes to the left, except it stays underneath the div on top of it. Could anyone help me out?

Are you using float:left; and float:right; in your CSS?
You should also make sure you set a width to each, such as width:40%; for sidebar, and width:60% for whatever the main content is.

You should post some of your code and we'll fix it up for you 🙂
Have to make sure both divs can fit. Also don't forget to clear your floats
I think clear:both will fix your problem.
However showing us your code would help a lot.
Also if you're setting width of sidebar to say 40% and rest of the content to 60% make sure you've cleared all the paddings & margins with a CSS reset.
Web Designer / Developer & SEO Expert.

View Work
Earn 10% of the job you refer me to!

Skype aerox.design


I would recommend Frameworks like Bootstrap. With "col" you can make columns of diferent size. Its easy that way to make a grid and get what you want.
Anyways it would be good if you put some code from your problem i think you putted div's in a wrong way (Some rule of parent isnt alowing your changes in CSS)

[Image: Dwcuplb.png]


Possibly Related Threads...
Thread / Author Replies Views Last Post
by EffexionApr 15, 2021 05:12 AM 10 278 Apr 15, 2021 05:12 AM
Last Post: Goku
by CarrotDec 24, 2020 12:16 PM 0 244 Dec 24, 2020 12:16 PM
Last Post: Carrot
by craigOwnsYouOct 31, 2019 01:13 PM 0 102 Oct 31, 2019 01:13 PM
Last Post: craigOwnsYou