Blog Archives: Page 98
-
Cross Browser CSS Min-Height
As you know, Internet Explorer 6 does not follow CSS' "min-height" property. Luckily, we can fix this problem using the following CSS code snippet:
-
Advanced CSS – Class Is Out – Avoiding Classes By Using Formatting Tags For Structure
Nothing makes me cringe more than when I see other programmers use a class declaration for every XHTML tag in their programming. Using too many CSS class declarations can result in:
-
MooTools Image MouseOvers – Cleaner JavaScript Code, Less Hassle
Creating mouseover code can be a real mess but using MooTools I put together a solution that saves me time and keeps my code super clean. There are some practices that I use with my theory. All "mouseover" versions of the image end in "-mo". For example, sugar.jpg is the standard image while sugar-mo.jpg is the mouseover version. Also, I use a CSS class mo to identify which items have mouseovers. I also stick to one file extension and assume that the mouseover image's file extension is the same as the original file's extension.
-
Advanced CSS Printing – Using JavaScript Double-Click To Remove Unwanted DIVs
Like any good programmer, I'm constantly searching around the internet for ideas and articles that can help me improve my code. There are thousands of talented programmers out there so I stumble upon some great articles and code snippets that I like to print out and use at a later time. The most disappointing part of finding a great article is seeing the printed result — many times the article is unreadable and thus gets relegated to scratch-paper duty.
-
PHP Email Validator – Email MX DNS Record Check
Validating an email address is one of the hardest feats on the web. A valid email can be marketing gold, but an invalid email address is dead weight. Not only does it require a CPU-taxing PHP regular expression ("/^[A-z0-9\._-]+"."@" . "[A-z0-9][A-z0-9-]*". "(\.[A-z0-9_-]+)*"."\.([A-z]{2,6})$/"), the regular expression can be useless even after it's validated for format if the domain doesn't exist. A regular expression simply wont do — we need to think more low-level. What does email at any domain require? A DNS MX record. Well, PHP provides a great solution to validate that there's a MX record for the provided email address' domain.
-
Weekend Links: MooTools AJAX, Prototype 1.6, PHP Tips, SWFUpload, Accessibility, CSS Layouts
Another great week of programming, blogging, and events has gone past. Here are some of the highlights of the week:
-
PHP Force Download – Keep Track of What’s Going Down
A force-download script can give you more control over a file download than you would have providing a direct link. Using a force-download script, you can:
-
Removing Internet Explorer’s Active Content Warning on Flash Objects
A couple of years ago Internet Explorer cause millions of programmers and users alike a giant pain by making users click on a flash object, ActiveX object, and java applet before the object became active and usable. Businesses, of course, cried out for their programmers to fix the problem and programmers pulled their hair out for weeks. As one of those programmers, I can tell you that businesses wont take "Microsoft screwed things up" for an answer and luckily I found a solution that works without requiring that the user do anything.
-
PHP Email Encoder – Prevent Spam Bots From Collecting Email Addresses
Police have criminals. PETA has Michael Vick. Bud Selig has Barry Bonds. Programmers have spammers.
-
Advanced CSS Cursors – Increase Usability With A Pointer
All browsers provide their own stylesheet which includes settings link colors (blue for unvisited and purple for visited, in IE's case), default padding and margins, text sizes, and cursors. Browsers provide the pointer cursor to make it obvious to the user that the text or image that serves as the link is clickable. What about the other cases for clicking on elements? These elements include: