I have a drop down menu that is fed by a couple of variables pulled from a database.

The first is a user code string of variable length. The second is a description. I would like the code string to be a fixed length to format the description with a fixed left margin for each description. I want a tabbed effect.

I have tried str_pad, str_repeat etc. using   and it appears that there is no way to do this when using a proportional font.

Any ideas? Is there any way to invoke a tab within a drop down box?

Brian

    If you just need a bit of white space to the left of an option, do this:

    <option value="something">   Option name</option>

      Arg. That should be an " " before the option name, but I keep forgetting that this forum allows HTML...

        I have no problem with the leading spaces and I am aware that I need to use "  " (I typed that in my first note without the quote and it didn't appear)

        My problem is that I have two variable length strings that are combined to make the description.

        I don't know if this will format properly on this page but here goes.

        I get:

        PH1334_golf This is description
        TD345533_sports This is description

        I want:

        PH1334_golf This is description
        TD345533_sports This is description

        I am using Arial as the font.

        Brian

          Obviously the previous note didn't format properly. I'll try this with " s"

          I get:<br> PH1334_golf&nbsp;&nbsp;&nbsp;&nbsp;This is description<br>
          TD345533_sports&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is description<br><br> I want: <br> PH1334_golf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is description<br>
          TD345533_sports&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is description

          I am using a proportional font however, Arial

            Lets try this again.

            I get:

            PH1334_golf&nbsp;&nbsp;&nbsp;&nbsp;This is description
            TD345533_sports&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is description

            I want:

            PH1334_golf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is description
            TD345533_sports&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is description

            I am using a proportional font however, Arial

              *$#@$%

              I can't even get it to work here. What I want is a tabbed effect.

              Sorry for all the chaf. Can anybody help?

                If this is not possible, please let me know. There must be an elegant way to do this.

                Can anyone help?

                I'd appreciate your input, even if it is to tell me that it can't be done.

                Brian Irwin

                  Write a Reply...