Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: two styles in one textarea??


Message #1 by "payam." <torkian@c...> on Fri, 21 Feb 2003 20:36:04 +0330 (IRT)
Hey

One useful thing to know is this:
if you want a textarea, but the user doesn't have to input code into it, ie.
you just need the textarea to display code, use a div.

try pasting this code. even if you don't want it now, it is a handy piece of
code, worth storing in a library.

<html>
<style>
#texta {
    width:100px;
    height:100px;
    overflow:scroll;
 background-color:green;
}
</style>
<body>
<div id=texta>Hello, this is text.<p>There are scrollbars should I go off
the screen, just like a textarea!!<p>No isn't that just clever?
</div>
</body>
</html>



colin horne
----- Original Message -----
From: "payam." <torkian@c...>
To: "javascript" <javascript@p...>
Sent: Friday, February 21, 2003 5:06 PM
Subject: [javascript] two styles in one textarea??


> Is it possible to have two styles(for example to type of fonts) in one
area.
> E.g. one line in red and another line in green... ??
> thanks
>
>
>


  Return to Index