Forum Moderators: coopster

Message Too Old, No Replies

script text format

         

smartcard

9:20 pm on May 4, 2005 (gmt 0)

10+ Year Member



How can I disply the following code's message (You entered an invalid username or password! Try again) in red color? what will be the code?


{
$_SESSION['login']= '';
$strMessage = "You entered an invalid username or password! Try again";

}

sned

9:27 pm on May 4, 2005 (gmt 0)

10+ Year Member



You could use a <span> element, and some inline styles ...

{
$_SESSION['login']= '';
$strMessage = '<span style="color:#ff0000">You entered an invalid username or password! Try again</span>';

}

-sned

ergophobe

11:31 pm on May 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



better:

.warning {color:Red;}

then

$strMessage = '<span style="warning">You entered an invalid username or password! Try again</span>';

Semantic rather than presentational, in case you decide you want warnings to show as yellow or bold or whatever.