How to let the height of a div grow automatically with the height ofanother div?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Author

    How to let the height of a div grow automatically with the height ofanother div?

    I am new to CSS and I posted this question to the
    macromedia.drea mweaver newsgroup yesterday, but unfortunately no one
    seems to have a clue. At least no one has responded. So, I am
    posting it here and see if I will get any luck.

    I have a left div, which contains the navigation menu items, and a
    right div, which is the main content area.

    I set a background image (repeat-y) for the left div through css's
    background: url property.

    Now, I want to let the left div grow automatically along with the
    right div such that the background image won't stop half way down the
    page.

    I created a screen shot to illustrate this problem. See below.



    Any good idea? Thank you.
  • Chris F.A. Johnson

    #2
    Re: How to let the height of a div grow automatically with the height of another div?

    On 2008-06-23, Author wrote:
    I am new to CSS and I posted this question to the
    macromedia.drea mweaver newsgroup yesterday, but unfortunately no one
    seems to have a clue.
    That's why they use Dreamweaver.
    At least no one has responded. So, I am
    posting it here and see if I will get any luck.
    >
    I have a left div, which contains the navigation menu items, and a
    right div, which is the main content area.
    >
    I set a background image (repeat-y) for the left div through css's
    background: url property.
    >
    Now, I want to let the left div grow automatically along with the
    right div such that the background image won't stop half way down the
    page.
    >
    I created a screen shot to illustrate this problem. See below.
    >
    http://gnewsgroup.googlepages.com/cssdivheight
    Post a URL so that we can see the code.

    --
    Chris F.A. Johnson <http://cfaj.freeshell. org>
    =============== =============== =============== =============== =======
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)

    Comment

    • David Stone

      #3
      Re: How to let the height of a div grow automatically with the height of another div?

      In article <58348$486006cb $cef88ba3$25596 @TEKSAVVY.COM>,
      "Chris F.A. Johnson" <cfajohnson@gma il.comwrote:
      On 2008-06-23, Author wrote:
      I am new to CSS and I posted this question to the
      macromedia.drea mweaver newsgroup yesterday, but unfortunately no one
      seems to have a clue.
      >
      That's why they use Dreamweaver.
      The original poster's scenario (two columns with equal height)
      is a very common one; maybe they're all waiting for someone else
      to respond.
      At least no one has responded. So, I am
      posting it here and see if I will get any luck.

      I have a left div, which contains the navigation menu items, and a
      right div, which is the main content area.

      I set a background image (repeat-y) for the left div through css's
      background: url property.

      Now, I want to let the left div grow automatically along with the
      right div such that the background image won't stop half way down the
      page.

      I created a screen shot to illustrate this problem. See below.

      http://gnewsgroup.googlepages.com/cssdivheight
      You can't do this easily with just the two divs (left and right).
      You could wrap both in a containing div, and put the background
      image on that with repeat-y and no horizontal (x) repeat.

      If you (original poster) search for two-column equal height, you'll
      probably find lots of other suggestions...

      Comment

      • Bergamot

        #4
        Re: How to let the height of a div grow automatically with the heightof another div?


        David Stone wrote:
        >
        The original poster's scenario (two columns with equal height)
        is a very common one; maybe they're all waiting for someone else
        to respond.
        Or maybe they're tired of the same questions over and over again. I know
        I am. This one comes up repeatedly. It's been answered repeatedly, too.

        It boggles the mind how people can figure out how to post to a
        newsgroup, but can't figure out how to search the group archives,
        *especially* when they're posting through google groups. :-\

        --
        Berg

        Comment

        • Author

          #5
          Re: How to let the height of a div grow automatically with the heightof another div?

          On Jun 23, 6:02 pm, Bergamot <berga...@visi. comwrote:
          David Stone wrote:
          >
          The original poster's scenario (two columns with equal height)
          is a very common one; maybe they're all waiting for someone else
          to respond.
          >
          Or maybe they're tired of the same questions over and over again. I know
          I am. This one comes up repeatedly. It's been answered repeatedly, too.
          >
          It boggles the mind how people can figure out how to post to a
          newsgroup, but can't figure out how to search the group archives,
          *especially* when they're posting through google groups. :-\
          >
          --
          Berg
          Thank you very much for your hint. I did search around, but sometimes
          if you don't know the key words to search, you'll have bad luck in
          searching. For example, I am new to CSS, and I don't even know what
          this concept is called. David Stone has nicely suggested search key
          words which is absolutely helpful. Thanks a lot David.

          Once my electric garbage disposal sink went bad, but at that time, I
          did not know what this stuff is called. And I wanted to buy a part to
          replace this thing. I wanted to do a google-search, but did not know
          what key words to use, although I consider myself a good googler.

          Let me search for two columns equal height and see what happens.

          Comment

          • dorayme

            #6
            Re: How to let the height of a div grow automatically with the height of another div?

            In article
            <6ad56086-5c7f-463b-bf87-909f06775369@8g 2000hse.googleg roups.com>,
            Author <gnewsgroup@gma il.comwrote:
            I am new to CSS and I posted this question to the
            macromedia.drea mweaver newsgroup yesterday, but unfortunately no one
            seems to have a clue. At least no one has responded. So, I am
            posting it here and see if I will get any luck.
            >
            I have a left div, which contains the navigation menu items, and a
            right div, which is the main content area.
            >
            I set a background image (repeat-y) for the left div through css's
            background: url property.
            >
            Now, I want to let the left div grow automatically along with the
            right div such that the background image won't stop half way down the
            page.
            >
            I created a screen shot to illustrate this problem. See below.
            >

            >
            Any good idea? Thank you.
            You might get some ideas from:

            <http://netweaver.com.a u/floatHouse/page10.html>

            --
            dorayme

            Comment

            Working...