Important Code Snippets - CSS / HTML / Javascript / PHP
Submitted by admin on Fri, 2009-09-04 10:54
You can find the code snippets here.
* CSS
o Accessibility/SEO Friendly CSS Hiding
o All Stylesheet Media Types
o Basic Link Rollover as CSS Sprite
o Better Helvetica
o Centering a Website
o Change Text Selection Color
o Cross Browser Inline-Block
o Cross Browser Opacity
o Cross-Browser hr Styling
o Cross-Browser Min Height
o CSS Diagnostics
o CSS Font Families
o CSS Text Shadow
o CSS3 Zebra Striping a Table
o Exactly Center an Image/Div Horizontally and Vertically
o Font Shorthand
o Force Element To Self-Clear it’s Children
o Force Vertical Scrollbar
o Give Clickable Elements a Pointer Cursor
o IE Hacks
o Link Pseudo-Classes (In Order)
o Meyer Reset
o Not-Terrible Image Resizing in IE
o PNG Hack/Fix for IE 6
o Prevent Superscripts and Subscripts from Affecting Line-Height
o Print URL After Links
o Remove Button Text in IE7
o Remove Dotted Focus Borders
o Removing Dotted Outline
o Rounded Corners
o Standard CSS Image Replacement
o Style Override Technique
o Text Rotation
o Using @font-face
* HTML
o Add Body Class Just For IE
o Basic Microformatted hCard
o Meta Tag For Forcing IE 8 to Behave Like IE 7
o Open Link in a New Window
o Serve Stylesheet for Everything Except IE 6
o The Common DOCTYPES
* JavaScript
o Auto Select Textarea Text
o CSS for when JavaScript is Enabled
o Detect Internet Explorer
o Detect Javascript On/Off, With Notification
o Different Stylesheet Pending the Time of Day
o Different Stylesheets for Different Days of the Week
o Get URL Variables
o JavaScript Array Contains
o Modern Event Handling
o Prevent Background Image Flickering in IE
o Redirect Mobile Devices
o Show/Hide Element
o Viewport Size, Screen Resolution, Mouse Postition
* jQuery
o Add Non-Breaking Space on Title to Prevent Widows
o Adding/Removing Class on Hover
o Append Site Overlay DIV
o Automatically Discover Document Links And Apply Class
o Browser Detetction + Apply Classes to HTML Element
o Check if Element Exists
o Clear Default Search String on Focus
o Display Last Tweet
o Display Latest FeedBurner Post
o Display Only First X Divs, Toggle Rest
o Equalize Heights of Divs
o Fade Image Into Another Image
o Highlight All Links To Current Page
o Image Preloader
o Inputs That Remember Original Value
o jQuery Tweetify Text
o Link Nudging
o Make Entire Div Clickable
o Open External Links In New Window
o Run JavaScript Only After Entire Page Has Loaded
o Set/Clear Default Input Value
o Simple jQuery Accordion
o Sliding Background Links
o Smooth Scrolling
o Zebra Stripe a Table
* PHP
o Append Non-Breaking Space Between Last Two Words
o Applying Even/Odd Classes
o Automatic Copyright Year
o Automatic Mailto Links
o Basic Database Connection, Random Query, Display Result
o Change Graphics Based on Season
o Change Month Number to Month Name
o Check if Website is Available
o Create Unique AlphaNumeric
o Crop Image
o Detect AJAX Request
o Detect IE5 or IE6
o Display a User Gravatar from an Email Address
o Display Array Contents
o Display FeedBurner Feed Count
o Email Address Validation
o Find All Links on a Page
o Find File Extension
o Find URLs in Text, Make Links
o Get FeedBurner Subscriber Count with cURL
o Get Suffix of Given Number
o Highlight a Substring
o MySQL Backup Class
o MySQL Database Access Class
o MySQL Restore Class
o Options to Truncate Strings
o PHP Date Parameters
o PHP IE Detection
o Randomize File Name
o Return Only One Variable from MySQL Query
o Separate First and Last Name
o Time Ago Function
o URL Validation
* WordPress
o Change Avatar Size
o Disable Automatic Formatting
o Disable Automatic Formatting Using a Shortcode
o Embed a Page inside a Page
o Find ID of Top-Most Parent Page
o ID the Body Based on URL
o Include Any File From Your Theme
o Login/Logout and User Welcome
o Natural Sort Using Post meta_key
o Prevent CSS Caching
o Prevent Search Bots from Indexing Search Results
o Remove Specific Categories From The Loop
o Run a Loop Outside of WordPress
o Run Loop on Posts of Specific Category
o Using Custom Fields
Visit the Website : ->:
Web Development:
IT Resources.: