Get a free trial // Grow your CSS skills // Land your dream job

Make on element’s length follow another?

  • # April 19, 2009 at 10:06 am

    Hello. I’m new to CCS but struggling on with DW :)

    I try to make DreamWeaver’s basic site with a header, footer and two elements in the middle (Menu and Content). Now. As I put text within the content element it expands when I reaches the margin and that’s the way it should be. But I really want the menu’s length to follow the main content. Like for the look of the site.


    Is this possible to do? I’m not good in codes at all. I’m reading everywhere and it’s quite fun. Can’t one write something like height=equal with id="maincontent" or something?


    # April 19, 2009 at 1:10 pm

    Basically, wrap menu and content in another div. Ive called it #page-wrap. Position this relatively.
    For the menu div and the container div, position them absolutely. This is what I did:

    #page-wrap {width:960px;margin:20px auto; background: #daede9;position:relative;min-height:520px}
    #main {position:absolute;margin:0 220px 0 10px; top:70px;bottom:10px;background: #bbca45;}
    #sidebar {position:absolute;width:180px;right:10px;top:70px;bottom:10px; background: #ae6561;}

    Have a look at Should explain better if you look at the code and see how its done

    # April 21, 2009 at 6:43 am

    Thank you, I will try this later when I managed to solve some other issues I got :)

    # April 21, 2009 at 10:47 am

    Check this thread as well:


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed