background preloader

How to Create a Contact Form using HTML5, CSS3 and PHP

How to Create a Contact Form using HTML5, CSS3 and PHP
Personally, I feel it is important to be aware of the [positive] impact HTML5 will have on forms and the way they will function in years to come. Realistically, we can’t implement all of the new features today, but you don’t want to be lagging behind the rest of the industry when these features finally become widely supported. Having said that, this tutorial will be focusing on the new HTML5 features that are already supported by all the major browsers, or that at least employ graceful degradation for the browsers that are still trying to play catch up. 1. The Design First of all, this is not a Photoshop tutorial. 2. Now we have a design to work towards, we’re going to form the structure of the contact form using HTML5. Doctype Okay, now we’ve got our blank PHP document, let’s start with the appropriate doctype, which is a lot simpler in HTML5 than previous versions to say the least! <! Yep, that’s right. Just to compare, here’s the doctype for XHTML; <! Structure <! That’s right. The Form 3. <?

Bolt Bolt is designed to be flexibly sized and responsive, and to progressively enhance. Base classes concentrate on layout techniques, and optional vertical rhythms and horizontal grids are included. Bolt does not give you any colour. Bolt prefers CSS over JavaScript. Bolt's classes come with behaviour attached. Events are delegated, so there are no plugins to call to make these interactive elements work. <a href="#time">Time is an illusion. Try it: Time is an illusion. Lunchtime, doubly so The Incredible Em & Elastic Layouts with CSS Almost a year ago, Ty Gossman over at Stylegala asked me to write an article about elastic layouts. The best I could do was a quick email between work. I always meant to come good on that. This article will walk you through creating a basic elastic layout; what exactly an “em” is and how to calculate them, how to use ems to create an elastic layer for content with scalable text and images, including basic vertical rhythm. What is an Elastic Layout? An elastic layout scales with users’ text size. More accurately, an elastic interface scales with browser text size—commonly a default of 16px—which users can change if they wish. Elastic design uses em values for all elements. They are calculated based on the font size of the parent element. See the elastic layout example. For other live elastic examples, visit Dan Cederholm’s beautiful and elastic SimpleBits, or resize text on this site. Introducing Em, the Elastigirl of CSS The em is a unit of measurement in typography. Getting Started N.B.

24 Best CSS3 Animation Demos and Tutorials Today we are showcasing a post on CSS3 Animation featuring some of the best and most awesome functions. CSS3 is full of amazing features that you can take advantage of that you may not know about. That’s why we are going to go over some of those CSS3 features that are less explored. Some of these CSS3 Animation effects you will find below may not be visible to you if you are using the Firefox browser. Display social icons in a beautiful way using CSS3 The example works with all -webkit based browsers (Safari and Chrome), but also in Firefox 4. More on Display social icons in a beautiful way using CSS3 Advertisement 3d animation using pure CSS3 The perspective property is what we need to create the 3d effect. More on 3d animation using pure CSS3 Colorful Clock Make a colorful jQuery & CSS clock, which will help you keep track of those precious last seconds of the year. More on Colorful Clock Colourful rating system with CSS3 We’re going to do a relatively simple jQuery tutorial. jQuery DJ Hero

LESS « The Dynamic Stylesheet language Debugger, Responsive Design View and more in Firefox Aurora 15 Firefox 15 is now in the Aurora channel and has some big new features and improvements to the built-in tools for web developers. JavaScript Debugging Firefox now ships with a Debugger (available via the Web Developer menu, or with the ctrl-shift-S/cmd-opt-S keyboard shortcut). Use this tool to quickly hunt down problems in your JavaScript code. Quickly Get to the Source When you open the Debugger, all of the page’s scripts are listed in a menu. Of course, there are two other easy ways to get to the source you care about. Once you are looking at the source you care about, you can set a breakpoint by clicking to the left of the line number in the view of the JavaScript source. When the Debugger has Paused Your Script Once your script has been paused by the Debugger, the stack frames are listed in the pane on the left and the in-scope variables are displayed in the pane on the right. Under the Hood It’s fast! In a future article, we’ll show you how to do that. Responsive Design View Layout View

necolas/css3-github-buttons idiomatic-css/README.md at master · necolas/idiomatic-css CSS Font Shorthand Property Cheat Sheet In the past I’ve displayed some serious animosity towards the CSS font shorthand property, so I feel I should make up for it. After all, the font shorthand property was just minding its own business, trying to save developers some lines of code, and I come along and declare it an outcast. So, although I still don’t agree with ever using font shorthand, I do think it’s important that CSS developers understand how it works. So to make up for my former font shorthand hostilities, I’ve prepared a printable cheat sheet that you can download and hang next to your computer, which will come in handy in case you decide to use this property yourself, or are forced use it in a stylesheet from an inherited project. Enjoy! Download the CSS Font Shorthand Cheat Sheet (PDF) Advertise Here Comment Rules: Please use a real name or alias. Instructions for code snippets: Wrap inline code in <code> tags; wrap blocks of code in <pre> and <code> tags.

Coding An HTML 5 Layout From Scratch Understanding vertical-align, or "How (Not) To Vertically Center Content" A FAQ on various IRC channels I help out on is How do I vertically center my stuff inside this area? This question is often followed by I'm using vertical-align:middle but it's not working! The problem here is three-fold: HTML layout traditionally was not designed to specify vertical behavior. vertical-align in table cells When used in table cells, vertical-align does what most people expect it to, which is mimic the (old, deprecated) valign attribute. <td valign="middle"><! Shown in your browser, the above (with appropriate wrappers) display as: <div> using display:table-cell; vertical-align:middle <div> using display:table-cell; vertical-align:bottom vertical-align on inline elements When vertical-align is applied to inline elements, however, it's a whole new ballgame. <img align="middle" ... In your browser, here's how the above code renders: In this paragraph, I have two images— and —as examples. vertical-align on other elements So how do I vertically-center something?! Method 1 Hey look! Method 2

Related: