Target IE6 and IE7

#myelement
{
color: #999;              /* shows in all browsers */
*color: #999;             /* notice the * before the property - shows in IE7 and below */
_color: #999;         /* notice the _ before the property - shows in IE6 and below */
}
Read more!

Recent css Tricks learned

 

 1. z-index only applies to elements that are given a "position" value

2. margin: auto" will only work when a width is declared for the element.

3. padding adds to the overall width of the element. and cannot contain negative values.

4.CSS Specificity
CSS styles follow an order of specificity and point values to determine when styles override one another or take precedence.


They are like so:

Elements – 1 points
Classes – 10 points
Identifiers – 100 points
Inline Styling – 1000 points
When in doubt, get more specific with your style declarations. You can also use the !important declaration for debugging purposes if needed

Read more!

Browser sniffing or detection : Conditional Css



<!--[if gt IE 6]>
<link rel="stylesheet" type="text/css" href="css/ie7fix.css" media="screen" />

<![endif]-->
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="css/ie6fix.css" media="screen" /> 

<![endif]-->




<script language="Javascript" >

    var useragent = navigator.userAgent;
    var bName = (useragent.indexOf('Firefox') > -1) ? 'Firefox' :
navigator.appName;


    if (bName == "Firefox") 
    {
        
        document.writeln('<style> #nav_bar_t6 {padding-left:33px;
padding-right:33px; } #footer {margin-left:18%}</style>');
    }

    if(navigator.userAgent.indexOf ("Netscape")!=-1)
    {
        
        document.writeln('<style> #nav_bar_t4 {WIDTH:
14.2%;padding-left:2px;} #footer {margin-left:18%}</style>');
    }
    
    if(navigator.userAgent.indexOf ("Opera")!=-1)
    {
        document.writeln('<style> #nav_bar_t6 {padding-left:38px;
padding-right:33px;} #footer {margin-left:18%}</style>');
    }
</script>





Read more!

MySQL table and want to build a XML file with it in order to make a RSS feed.

  
  <?php   $dom = new DOMDocument() ; include "connection.php"; $queryz = "SELECT * FROM ticker"; $resultz = mysql_query($queryz) or die('Error, query failed'); $row = mysql_fetch_assoc($resultz); $rss = $dom->createElement('rss'); while($row = mysql_fetch_array( $resultz )) {     $item = $dom->createElement("item");     $item->appendChild($dom->createElement("title", $row['item_title']));     $item->appendChild($dom->createElement("pubDate",$row['item_pubDate']));     $item->appendChild($dom->createElement("description",$row['item_description']));     $item->appendChild($dom->createElement("link",$row['item_link']));     $rss->appendChild($item); } $dom->appendChild($rss); $dom->save("myxml.xml");
  
  
  
  OR
  
<?php header('Content-Type: text/xml; charset=UTF-8');   $dom = new DOMDocument() ;  include "connection.php"; $queryz = "SELECT * FROM ticker"; $resultz = mysql_query($queryz) or die('Error, query failed'); $row = mysql_fetch_assoc($resultz); while($row = mysql_fetch_array( $resultz )) { $tit = $dom->createElement("title", $row['item_title']) ; $pub = $dom->createElement("pubDate",$row['item_pubDate']) ; $des = $dom->createElement("description",$row['item_description']) ; $lnk = $dom->createElement("link",$row['item_link']) ;        $dom->appendChild($tit) ;        $dom->appendChild($pub) ;       $dom->appendChild($des) ;       $dom->appendChild($lnk) ;  }  $dom->save("myxml.xml") ;  ?>


RSS Display
<?php include('rss-feed-reader.php');   $feed = 'http://www.domain.com/feed.xml'; $max_items = 5; $rss = new mod_rss(); $rss->parser($feed, $max_items, true);  ?>
Read more!

Seven tips to identify a LIAR

1. Consider the person's recall:
 Liars never forget what they have to say but they may stumble when telling a tale by making contradicting statements. They're also eager to change the subject. 

2. Observe the person's overall body language:
Liars can look ill at ease,
fiddling with their hair,
stroking their throat,
or rubbing their eyes.

With their body often turned away from you, you may notice hand or leg fidgeting. Liars also have trouble swallowing and may shake their heads after a point has been made. When the subject finally gets changed, they appear happier and more comfortable, maybe laughing nervously. 

3. Take notice of any defensiveness:
Liars will often take offence to any indication that they're under suspicion. They're likely to throw any accusations you throw at them back at you. They will also talk too much, feeling the need to over-explain themselves. 

4. Home in on facial expressions:
Liars fail to control their micro-expressions. While fibbing, you may notice nervous twitching. Their hand may be covering or touching their face. People also tend to touch the mouth when feeling guilty or anxious. They're particularly good with fake smiles. 

5. Don't overlook the Pinocchio reaction: When a human tells a lie, extra blood gets pumped through the body and the nose swells by a fraction of millimeter. Liars may subsequently touch the tip of their nose unconsciously. 

6. Concentrate on the eyes:
 A liar has a troubled brow and downcast or darting eyes. They have trouble directly engaging your gaze. They also give you eye-accessing clues. If the person is telling you the truth, he'll look up and to the left since that's the side of the brain we use for recalling information. If she's lying, she'll look up and to the right, which is the creative side of the brain, because she's mentally constructing something that hasn't happened

7. Note the person's voice:
The higher the stakes are, the more the liar has a fear of getting caught. With this, the liar has a harder time controlling his body language or her voice. The pitch or rate of the speech may change, with the individual giving a lot of "umms" and "ahhs." Often, a liar will appear stilted and monotone. Answers may seem rehearsed.


Read more!