text fields: no right align ???

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default text fields: no right align ???

    Hi,

    I can't seem to make text align to the right (or to the center) in a
    text field. Am I blind or is it just not possible ? In any case, such an
    <input> tag certainly does not respond to an align="right" (or
    align="center") attribute.

    I have fields that contain figures, and they look horrible as they are
    left-aligned.

    Bernard
    bthouin Guest

  2. Similar Questions and Discussions

    1. Align Text Vertically
      I'm learning on v IN 1 tryout. I fear most of you larned on a CS version but anyway heres my question. I do NOT see a vertical alignment option...
    2. Text Align is Grayed Out
      I am having an issue with one particular site. The site was created in DW CS3 using the built in style sheet templates. When I try to edit the site...
    3. Align text
      Hi again, Thanks for you help with my data structure problem, a hash of hashes problem did the job :-) I would like to know how to align text...
    4. how to Align text left & vertical align middle
      Hello, I have a asp lable control, which I use to display text in, I would like to have the text display aligned in the center and vertical...
    5. Text Align
      When I install my accesss 2000 application on some machines the application ignores the "Text Align" Property Setting in some Activex Controls(List...
  3. #2

    Default Re: text fields: no right align ???

    You can use CSS to specify -

    input { text-align:center | right; }

    but it's not universally supported in browsers (I can't remember where it
    breaks).

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "bthouin" <bernard_thouin@bluewin.ch> wrote in message
    news:d1cj4c$e0p$1@forums.macromedia.com...
    > Hi,
    >
    > I can't seem to make text align to the right (or to the center) in a text
    > field. Am I blind or is it just not possible ? In any case, such an
    > <input> tag certainly does not respond to an align="right" (or
    > align="center") attribute.
    >
    > I have fields that contain figures, and they look horrible as they are
    > left-aligned.
    >
    > Bernard

    Murray *TMM* Guest

  4. #3

    Default Re: text fields: no right align ???

    Hi Murray,

    And, what is supposed to happen ?

    I added your line in my css, but there is no change whatsoever in the
    alignment of the fields. Or do I have to use this as the class name in
    my text fields ? I don't know exactly what's the meaning and use of the
    css tags which do not have a dot in front of them, like body, td and th.
    Can you help ? Sorry to bother you, but I am using css without having
    studied it at all...:-)

    Bernard

    Murray *TMM* wrote:
    > You can use CSS to specify -
    >
    > input { text-align:center | right; }
    >
    > but it's not universally supported in browsers (I can't remember where it
    > breaks).
    >
    bthouin Guest

  5. #4

    Default Re: text fields: no right align ???

    Show me how you added this to your code, please.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "bthouin" <bernard_thouin@bluewin.ch> wrote in message
    news:d1cvgg$32v$1@forums.macromedia.com...
    > Hi Murray,
    >
    > And, what is supposed to happen ?
    >
    > I added your line in my css, but there is no change whatsoever in the
    > alignment of the fields. Or do I have to use this as the class name in my
    > text fields ? I don't know exactly what's the meaning and use of the css
    > tags which do not have a dot in front of them, like body, td and th. Can
    > you help ? Sorry to bother you, but I am using css without having studied
    > it at all...:-)
    >
    > Bernard
    >
    > Murray *TMM* wrote:
    >> You can use CSS to specify -
    >>
    >> input { text-align:center | right; }
    >>
    >> but it's not universally supported in browsers (I can't remember where it
    >> breaks).
    >>

    Murray *TMM* Guest

  6. #5

    Default Re: text fields: no right align ???

    Murray *TMM* wrote:
    > Show me how you added this to your code, please.
    >
    I just added the line to my css like this:
    ....
    th {font-family: Arial, Helvetica, sans-serif;}

    input { text-align:center | right; }

    ..t0{border-width:0 0 0 0 ;border-style:none none none none ;}
    ..t1{border-width:0 0 thin 0 ;border-style:none none solid none
    ;border-bottom-color:#000000;}
    ....

    My text fields are constructed, the code looks like this:

    Response.Write(Chr(13) & Chr(10) & "<td width=""10%"" " & fmt & "><input
    type=""text"" class=""style8b"" " & fmt & " name=""" & colId & """
    size=""10"" value=""" & content & """></td>")

    The important element is the "fmt" variable, which I read from the DB:
    Its value is for example:

    align="right"

    As you can see, I used it on the cell, AND on the text field. The cell
    bit works (the text field is aligned correspondingly in the cell), but
    the text field doesn't. The generated HTML looks like this:

    <td width="10%" align="right"><input type="text" class="style8b"
    align="right" name="E" size="10" value="110000"></td>


    (the style8b is an 8 point font bolded)

    Thanks for your time.

    Regards
    Bernard
    bthouin Guest

  7. #6

    Default Re: text fields: no right align ???

    Maybe try

    [url]http://www.google.co.uk/search?q=right+align+input+box[/url]

    --
    Jules
    [url]http://www.charon.co.uk/charoncart[/url]
    Charon Cart 3
    Shopping Cart Extension for Dreamweaver MX/MX 2004


    Julian Roberts Guest

  8. #7

    Default Re: text fields: no right align ???

    Try this -

    input { text-align:center; } /* to center align the text */
    input { text-align:right; } /* to right align the text */




    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "bthouin" <bernard_thouin@bluewin.ch> wrote in message
    news:d1d1rn$6db$1@forums.macromedia.com...
    > Murray *TMM* wrote:
    >> Show me how you added this to your code, please.
    >>
    >
    > I just added the line to my css like this:
    > ...
    > th {font-family: Arial, Helvetica, sans-serif;}
    >
    > input { text-align:center | right; }
    >
    > .t0{border-width:0 0 0 0 ;border-style:none none none none ;}
    > .t1{border-width:0 0 thin 0 ;border-style:none none solid none
    > ;border-bottom-color:#000000;}
    > ...
    >
    > My text fields are constructed, the code looks like this:
    >
    > Response.Write(Chr(13) & Chr(10) & "<td width=""10%"" " & fmt & "><input
    > type=""text"" class=""style8b"" " & fmt & " name=""" & colId & """
    > size=""10"" value=""" & content & """></td>")
    >
    > The important element is the "fmt" variable, which I read from the DB: Its
    > value is for example:
    >
    > align="right"
    >
    > As you can see, I used it on the cell, AND on the text field. The cell bit
    > works (the text field is aligned correspondingly in the cell), but the
    > text field doesn't. The generated HTML looks like this:
    >
    > <td width="10%" align="right"><input type="text" class="style8b"
    > align="right" name="E" size="10" value="110000"></td>
    >
    >
    > (the style8b is an 8 point font bolded)
    >
    > Thanks for your time.
    >
    > Regards
    > Bernard

    Murray *TMM* Guest

  9. #8

    Default Re: text fields: no right align ???

    Yes, it works, BUT...
    - then ALL text fields AND buttons (!) are either right-aligned, OR
    centered, OR left-aligned

    What I'd need is to be able to apply that alignment INDIVIDUALLY on a
    given text field when I need it, i.e.
    - text fields containing texts usually left-aligned, sometimes centered
    - text field containing numbers right-aligned
    I have ALL these types of fields on the same page, same form, in the
    same table and the same row !

    Is that solvable ???

    Bernard

    Murray *TMM* wrote:
    > Try this -
    >
    > input { text-align:center; } /* to center align the text */
    > input { text-align:right; } /* to right align the text */
    >
    >
    >
    >
    bthouin Guest

  10. #9

    Default Re: text fields: no right align ???

    Murray,

    I found how to do it:
    - added a new style:

    ..style8bright {
    text-align: right;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8pt;
    font-weight: bold;
    }

    and applied it on my "numeric" text fields. I had already font and
    weight on these fields in a "style8b" definition, so really the only new
    thing is the text-align instruction.

    Works beautifully ! I'm happy !

    Thanks, you brought me on the right track. And, in passing, I understand
    now the meaning of the styles with and without dot in the front...

    Regards
    Bernard

    Murray *TMM* wrote:
    > Try this -
    >
    > input { text-align:center; } /* to center align the text */
    > input { text-align:right; } /* to right align the text */
    >
    >
    >
    >
    bthouin Guest

  11. #10

    Default Re: text fields: no right align ???

    Thanks Jules, I found the solution in the meantime (see my answer to
    Murray), at least for IE, which I am using.

    But I have made another post to you which you might not have seen, about
    effects of the Replace() statement. Look at my message (an answer to
    your answer in that thread) in the thread "apostrophe entered into my
    form messing up my query". The time stamp I see for my message is 17
    March, 23:46. I would very much like help on the problem I got there !

    Thanks and regards
    Bernard

    Julian Roberts wrote:
    > Maybe try
    >
    > [url]http://www.google.co.uk/search?q=right+align+input+box[/url]
    >
    bthouin Guest

  12. #11

    Default Re: text fields: no right align ???

    Good going. That'll do it.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "bthouin" <bernard_thouin@bluewin.ch> wrote in message
    news:d1e78f$p2n$1@forums.macromedia.com...
    > Murray,
    >
    > I found how to do it:
    > - added a new style:
    >
    > .style8bright {
    > text-align: right;
    > font-family: Arial, Helvetica, sans-serif;
    > font-size: 8pt;
    > font-weight: bold;
    > }
    >
    > and applied it on my "numeric" text fields. I had already font and weight
    > on these fields in a "style8b" definition, so really the only new thing is
    > the text-align instruction.
    >
    > Works beautifully ! I'm happy !
    >
    > Thanks, you brought me on the right track. And, in passing, I understand
    > now the meaning of the styles with and without dot in the front...
    >
    > Regards
    > Bernard
    >
    > Murray *TMM* wrote:
    >> Try this -
    >>
    >> input { text-align:center; } /* to center align the text */
    >> input { text-align:right; } /* to right align the text */
    >>
    >>
    >>
    Murray *TMM* Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139