Dragan Marjanovic
Dragan Marjanovic

Reputation: 1287

Getting the sidebar to behave?

Ok Im working on a site that has a sidebar and a main content section. The site is made using DIV's but the problem Im getting is that the sidebar doesnt stretch vertically with the content div. For example the sidebar has a few links while the content div has alot of stuff I want the sidebar to stretch. Thanks

Upvotes: 0

Views: 67

Answers (1)

sandeep
sandeep

Reputation: 92803

You can use display:table-cell property for this & remove float from them. Write like this:

#sidebar,#content_box{
    display:table-cell;
}

Check this http://jsfiddle.net/MQy4Y/2/

It's works till IE8 & above.

Upvotes: 2

Related Questions