8 Replies Latest reply on Jan 17, 2009 6:53 AM by Newsgroup_User

    width div with image

    Level 7
      --
      Groet,
      Adriana


        • 1. Re: width div with image
          Level 7
          <wave>

          --
          Murray --- ICQ 71997575
          Adobe Community Expert
          (If you *MUST* email me, don't LAUGH when you do so!)
          ==================
          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
          ==================


          "A.Translator" <transDELlatoria@LETEgmail.com> wrote in message
          news:gkl42a$7v2$1@forums.macromedia.com...
          > --
          > Groet,
          > Adriana
          >
          >

          • 2. Re: width div with image
            Level 7
            > <wave>

            I had thought my question too stupid so deleted it from the server, but
            an empty message obviously remained. Apologies. (I wanted an elastic
            div to expand with the size of the image in it, but I think it cannot
            be done.)

            --
            Groet,
            Adriana


            • 3. Re: width div with image
              Level 7
              > I wanted an elastic
              > div to expand with the size of the image in it

              That's how an "elastic" container would work, but it would depend on how you
              made it "elastic". Let's see the code.

              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              ==================


              "A.Translator" <transDELlatoria@LETEgmail.com> wrote in message
              news:gkmvbq$p7k$1@forums.macromedia.com...
              >> <wave>
              >
              > I had thought my question too stupid so deleted it from the server, but
              > an empty message obviously remained. Apologies. (I wanted an elastic
              > div to expand with the size of the image in it, but I think it cannot
              > be done.)
              >
              > --
              > Groet,
              > Adriana
              >
              >

              • 4. Re: width div with image
                Level 7
                >> I wanted an elastic
                >> div to expand with the size of the image in it

                > That's how an "elastic" container would work, but it would depend on
                > how you made it "elastic". Let's see the code.

                I made up a page to illustrate what I want:
                http://www.spinsister.nl/zandbak/elastic.htm

                I want the div imagebox to snugly wrap itself around the image and the
                caption centered underneath.

                I can achieve this by adjusting the width of the imagebox so that it is
                the same as the width of the image.

                But I have lots of images on my pages, of different widths, so I would
                really like all to have the same imagebox class, but with the width
                automatically adjusted.

                Is this possible?

                Thanks again for your patience, Murray.

                --
                Groet,
                Adriana


                • 5. Re: width div with image
                  Level 7
                  A.Translator wrote:
                  >>> I wanted an elastic
                  >>> div to expand with the size of the image in it
                  >
                  >> That's how an "elastic" container would work, but it would depend on
                  >> how you made it "elastic". Let's see the code.
                  >
                  > I made up a page to illustrate what I want:
                  > http://www.spinsister.nl/zandbak/elastic.htm
                  >
                  > I want the div imagebox to snugly wrap itself around the image and the
                  > caption centered underneath.
                  >
                  > I can achieve this by adjusting the width of the imagebox so that it is
                  > the same as the width of the image.
                  >
                  > But I have lots of images on my pages, of different widths, so I would
                  > really like all to have the same imagebox class, but with the width
                  > automatically adjusted.
                  >
                  > Is this possible?
                  >
                  > Thanks again for your patience, Murray.

                  Wouldn't a <SPAN> be better at this, as its an inline element, not a block?

                  Dooza
                  • 6. Re: width div with image
                    Level 7
                    > Wouldn't a <SPAN> be better at this, as its an inline element, not a
                    > block?

                    thanks, but that would defeat the purpose: having one solution for all
                    div's of a particular class containing images of different widths.

                    --
                    Groet,
                    Adriana


                    • 7. Re: width div with image
                      Level 7
                      A.Translator wrote:
                      >> Wouldn't a <SPAN> be better at this, as its an inline element, not a
                      >> block?
                      >
                      > thanks, but that would defeat the purpose: having one solution for all
                      > div's of a particular class containing images of different widths.
                      >

                      then maybe try this in your css:

                      display: inline;

                      Dooza
                      • 8. Re: width div with image
                        Level 7
                        > display: inline;

                        Doesn't work either.

                        I had made the very stupid mistake of defining a class and assigning a
                        id. That is corrected. But it seems a div can only see what it is in,
                        not what is in it.

                        Never minder.

                        --
                        Groet,
                        Adriana