Upper Case...

  • Thread starter Thread starter 116
  • Start date Start date
1

116

In any give field, how can I force upper case, or lower for that matter if
needed.

Thanks
David
 
Thank you Dan. But could you give an example? I have had very liitle
experience with css and html...Rookie.

David
 
If you wanted a whole paragraph displayed in upper case, you can either use
the <style> in the <head> section or you can use in-line style. The <head>
section method would be to place the following between <head> and </head> at
the top of your page (in code view)
<style type="text/css">
p.uppercase {text-transform:uppercase}
</style>
Then you would assign the class to the paragraph you want:
<p class="uppercase">This is some text.</p>
Alternatively, you can use in-line style like so:
<p style="text-transform:uppercase">This is some text.</p>
See http://www.w3schools.com/css/css_text.asp for more info.
 
Thanks. I have been out there messing around. Earlier when I mentioned
field, I was referring to a Text Box in a form. Do this also apply there as
well?

David
 
Input renders as uppercase in FireFox and IE8:

<input name="Text1" type="text" style="text-transform: uppercase;" >

However, it is unlikely the text will be sent to the server as uppercase
when the form is submitted - but your form handler can change it if using
PHP, asp or asp.NET - FrontPage extensions will not change the case.
--
Ron Symonds
Microsoft MVP (Expression Web)
http://www.rxs-enterprises.org/fp

Reply only to group - emails will be deleted unread.
 
For a form you're probably better using javascript to force upper case -
this way the form field contents will display to your user and be sent to
your server in upper case.

<input type="text" onkeyup="this.value=this.value.toUpperCase();"
name="whatever" />
or for lower case
<input type="text" onkeyup="this.value=this.value.toLowerCase();"
name="whatever" />
 
Thank you much. Did the trick.

David

Jon Spivey said:
For a form you're probably better using javascript to force upper case -
this way the form field contents will display to your user and be sent to
your server in upper case.

<input type="text" onkeyup="this.value=this.value.toUpperCase();"
name="whatever" />
or for lower case
<input type="text" onkeyup="this.value=this.value.toLowerCase();"
name="whatever" />





.
 
Back
Top