Subscribe

  • Subscribe

5 Useful Code Snippets for Web Developers

Posted by mk | July 29, 2009
.

Are You New Here? than get More Blogging Tips Subscribe to this blog today!

In this post you will find  5 interesting and useful code snippets purely for web developers and  coding lovers. This collection include several CSS, PHP, HTML, Ajax and jQuery snippets. Take a look!

1-CSS Layouts Collections

This page contains a collection of over 300 grids and CSS layout ready to use in your projects. Take a look, it’s very useful.

2-CSS @font-face
This snippet allows authors to specify online custom fonts to display text on their webpages without using images:

@font-face {
font-family: MyFontFamily;
src: url(’http://’);
}

3-PHP: Use isset() instead of strlen()
This snippet uses isset() instead strlen() to verify a PHP variable (in this example $username) is set and is at least six characters long. (via Smashing Magazine).

<?php

if (isset($username[5])) {
// Do something…
}

?>

4-HTML 5 CSS Reset

Richard Clark made a few adjustments to the original CSS reset released from Eric Meyers.

5. CSS Print Framework
Hartija is an universal Cascading Style Sheets Framework for web printing. To use this framework download the CSS file here and use this line of code into your web pages:

<link rel=“stylesheet” href=“print.css” type=“text/css” media=“print”>

Also Read: 5 Interesting Lightweight JQuery Plugins for Web developers & How to Implement a Launching Soon page with PHP and jQuery

If you have any suggestions and question than feel free to ask me i will response you.

and don’t forget to Subscribe for future updates by email or RSS


Share and Enjoy:
  • del.icio.us
  • Digg
  • Facebook
  • Google Bookmarks
  • Live
  • Mixx
  • Reddit
  • Yahoo! Buzz
  • StumbleUpon
  • Twitter

Related posts:

  1. 5 Fresh Tools & Resources for Web Developers
  2. 5 Interesting Lightweight JQuery Plugins for Web developers
  3. How to Implement a Launching Soon page with PHP and jQuery
  4. 10 Useful Resources for Web Designers and Web Developers
  5. 5 Fresh Resources for Web Developers – Take A look

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

CommentLuv Enabled
2 Comments so far
  1. Giorgio Sironi July 30, 2009 1:38 pm

    I like the css tips, but why use isset to verify a length?
    Giorgio Sironi´s last blog ..When to inject: the distinction between newables and injectables My ComLuv Profile

  2. mk July 30, 2009 1:52 pm

    its alternative just