Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fomatting HTML text

Status
Not open for further replies.

SoyDelicious

Technical User
Jul 23, 2002
46
US
Problem:

When issuing <font></font> command inside a text box value will not work.

Attempted solution:

Format text in CSS using a &quot;.&quot; as a seperator.

Example= <a href=&quot; color=&quot;#000000&quot;>Front.</font><font color=&quot;F4F4F4&quot;>Page</font></a>

So my CSS looks like this presently

a {
font-size: 11px
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #808080;
text-decoration: none; }


a:hover {
color: #ff6600;
text-decoration: none; }

a:active {
text-decoration:underline;
color: #000066; }
 
If you want to change the font inside a textbox, you can
use a style attribute, like this:

<input type=&quot;text&quot; name=&quot;words&quot; value=&quot;Search&quot; maxlength=40
size=10 style=&quot;width:44px;height:20px;font-size:8pt;&quot;>

This is actually CSS, so all the normal CSS attributes apply.
Note the only font attribute changed here is the size, but
you can also change the face, and basically anything else
you can do in CSSS

Hope that answers your questions.
MG
 
Actully I was hoping I could do the editing from the CSS, do you have any suggestions? In the meantime I will look for the button, its in javascript. Thanks in advance.
 
I'm sorry I dont think that I made this very clear...I don't care what the text looks like inside the text box. I care what it looks like on the way back out. So what I'm trying to do is configure the system so that it implies a rule that would make the text go to another color/font/ect after a &quot;.&quot; so for example I want Front.Page Front=color #000000 Page=color=#666666
 
Is this what your looking for?

<span class=&quot;fontClass1&quot;>text here!</span>
<span class=&quot;fontClass2&quot;>text here!</span>
<span class=&quot;fontClass3&quot;>text here!</span>

<style type=&quot;text/css&quot;>
.fontClass1{color:#f00}
.fontClass2{color:#0f0}
.fontClass3{color:#00f}
</style>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top