/* X Y Size Color */ -webkit-box-shadow: 10px 10px 25px #ccc; -moz-box-shadow: 10px 10px 25px #ccc; box-shadow: 10px 10px 25px #ccc; text-shadow: 2px 2px 5px #ccc;
Tag Archive for text
CSS3 Shadow properties
Vertical align text in floating div using css
HTML:
<div class="contentdiv">
<p>It works! Vertically Center Align!</p>
</div>
CSS:
.contentdiv{ width: 135px; height: 84px; display: table; border:2px solid red;}
.contentdiv p{ display: table-cell; vertical-align: middle; text-align: center;}
Hack for ie:
.contentdiv p{*margin-top: expression(this.offsetHeight < this.parentNode.offsetHeight ? parseInt((this.parentNode.offsetHeight - this.offsetHeight) / 2) + "px" : "0");}
Convert special characters to normal
$ts = array("/[À-Ã…]/","/Æ/","/Ç/","/[È-Ë]/","/[ÃŒ-Ã]/","/Ã/","/Ñ/","/[Ã’-ÖØ]/","/×/","/[Ù-Ü]/","/[Ã-ß]/","/[à -Ã¥]/","/æ/","/ç/","/[è-ë]/","/[ì-ï]/","/ð/","/ñ/","/[ò-öø]/","/÷/","/[ù-ü]/","/[ý-ÿ]/");
$tn = array("A","AE","C","E","I","D","N","O","X","U","Y","a","ae","c","e","i","d","n","o","x","u","y");
preg_replace($ts,$tn, $p);
Grep for files that do not match a pattern
grep -L "the pattern" * # to recurse into subdirectories grep -RL "the pattern" *
How to give text shadow using css
Here is a simple way to give shadow to a text using css.
HTML:
<div id="wrapper">
<span class="firstlayer">Text with shadow using CSS</span>
<span class="secondlayer">Text with shadow using CSS</span>
</div>
CSS:
.firstlayer {
font-size: 18px;
font-weight: bold;
color: #aa0000;
position: absolute;
top: 120px;
left: 20px;
z-index: 1;
}
.secondlayer {
font-size: 18px;
font-weight: bold;
color: #aaa;
position: absolute;
top: 122px;
left: 22px;
z-index: 0;
}
Show input Text while tipping
$('input#ID').keyup(function(){
$('div-where-the-text-will-show').text($(this).val());
});
limitChars
$('#message').keyup(function(){
limitChars('message', 160, 'charlimitinfo');
});
// The Function
function limitChars(textid, limit, infodiv)
{
var text = $('#'+textid).val();
var textlength = text.length;
if(textlength > limit)
{
$('#' + infodiv).html('You cannot write more then '+limit+' characters!');
$('#'+textid).val(text.substr(0,limit));
return false;
}
else
{
$('#' + infodiv).html(''+ (limit - textlength) +'');
return true;
}
}
AS3 Dynamic text bold format
var boldText:TextFormat = new TextFormat();
with (boldText) {
//font = "Verdana";
//size = 9.8;
//color = 0x000000;
bold = true;
}
my_textfield_txt.setTextFormat(boldText);
String aleatoreo
Public Shared Function TextoAleatorio(Optional ByVal largoMinimo As Int16 = 1, Optional ByVal largoMaximo As Int16 = Int16.MaxValue) As String Dim i As Integer Dim largo As Integer = NumeroAleatorio(largoMaximo, largoMinimo) Dim strTemp As New StringBuilder(largo) For i = 0 To largo - 1 strTemp.Append(Chr(NumeroAleatorio(maximo:=90, minimo:=65))) Next Return strTemp.ToString() End Function