www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to stretch sidebar to match content div

  1. #1
    Join Date
    Sep 2013
    Posts
    3

    How to stretch sidebar to match content div

    How do i stretch my sidebar to match the hight of my content div?

  2. #2
    Join Date
    Sep 2013
    Posts
    221
    You can easily get your desired results through display:table-cell;

    HTML:

    <div id="sidebar">sidebar</div>

    <div id="content">content</div>


    CSS:

    #sidebar {
    display:table-cell;
    width:100px;
    background:red;

    }
    #content {
    display:table-cell;
    width:100px;
    background:yellow;
    height:200px;
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles