5 Replies Latest reply: Oct 13, 2009 10:50 PM by Hari_639 RSS

    How to set a background color for a group of items

    396969
      I would like to set a background color for a group of items in order to visually tie them together without any blank space between the items.

      I think I probably need to create "stop and start table" items surrounding my group of items; however I do not know what to do after that.
        • 1. Re: How to set a background color for a group of items
          Hari_639
          Hi

          You may group the items with regions and then you can set style for all items to-gether. For e.g. let's say for 3 items, P1_ITEM1 , P1_ITEM2 and P1_ITEM3 you want to set back-ground color to 'blue' , then create HTML region and point these 3 items to this region . Now edit region and under 'Header and Footer' section paste
          <div style="background: blue">
          in region header and
          </div>
          in region footer.

          Hope it helps

          Cheers,
          Hari
          • 2. Re: How to set a background color for a group of items
            396969
            Hi Hari,

            I have additional items I want to display on the same line that I do not want to group together.

            For example, I want to group ITEM1, ITEM2 and ITEM3 together with the same background color (#DFDFDF) but ITEM4 (same line) should have a white background.

            ITEM1 ITEM2 ITEM3 ITEM4

            I thought I saw a forum entry about this using "START AND STOP TABLE" items some time ago but I cannot find it again.
            • 3. Re: How to set a background color for a group of items
              Hari_639
              Andy,

              I don't think you can do this using 'STOP AND START TABLE' items. Because you want different background color for your items and they should be in same row?

              However you may see how 'STOP AND START TABLE' works. Let's say seq#s for ITEM1, ITEM2, ITEM3 and ITEM4 are 10,20,30 and 40.

              Now create 'STOP AND START TABLE' item with seq# 15 (so that new table starts before ITEM1) and clear the 'label' text, if any.

              Now put the following in 'HTML Form Elements attribute' section
              style="background: #DFDFDF"
              Now just create one more 'STOP AND START TABLE' item with seq# 35

              Cheers,
              Hari
              • 4. Re: How to set a background color for a group of items
                396969
                Hi Hari,

                I created the two STOP AND START TABLE items as you suggested.

                Then I placed

                table style="background: #DFDFDF"

                in the first pre element text field and

                /table

                in the 2nd pre element text field and it worked. It put a background color around the group of items.

                I put angle brackets around the above table tags. I wasn't sure how the browser would interpret them inside my message so I excluded them from my message.

                Thanks.
                • 5. Re: How to set a background color for a group of items
                  Hari_639
                  Thats great! :-)

                  Cheers,
                  Hari

                  You can reward this reply by marking it as either Helpful or Correct :-)