background preloader

Bring Your Forms Up to Date With CSS3 and HTML5 Validation

Bring Your Forms Up to Date With CSS3 and HTML5 Validation
Let's look at how to create a functional form which validates users' data, client-side. With that done, we'll cover prettying it up using CSS, including some CSS3! First we want to conceptualize what our form is going to look like and how it is going to function. For this example, let's create a simple contact form that asks for the following information from the user: Name Email Website Message We want to make sure the user is entering the information correctly. Let's get an idea of what we want our form to look like by creating a rough mockup. As you can see, the following elements make up our form: Form Title Required fields notification Form labels Form inputs Placeholder text Form field hints Submit Button Now that we've specified which elements make up our form, we can create the HTML markup. Let's create our basic HTML markup from the form concept we created. Up to this point, our HTML file will still appear blank in the browser. Let's add some typographic styles to our form elements:

CSS Reset Filter Functionality with CSS3 Using the general sibling combinator and the :checked pseudo-class, we can toggle states of other elements by checking a checkbox or a radio button. In this tutorial we will be exploring those CSS3 properties by creating a experimental portfolio filter that will toggle the states of items of a specific type. View demo Download source The idea is inspired by Roman Komarov’s brilliant “Filtering elements without JS” experiment where he uses checkboxes and radio buttons for filtering colored shapes. The beautiful Dribbble shots used in the demos are by Mike from Creative Mints. The Markup Let’s start with the markup. The unordered list will contain all the portfolio items as anchors with an image and a span. The CSS We’ll be going through three example effects, but first, let’s take a look at the common style. I will omit all the vendor prefixes, but you will, of course, find them in the files. The main section container will have a specific width: Let’s move on to the item list: Example 1 Example 2

25 CSS3 Transitions and Animations Effects Tutorials Advertisement With the current and updated CSS3 transitions and animations, web developers have better options during the web development process. In fact, there were superseded techniques since the aim is to make the building of sites, easier, efficient, and faster. There are handfuls of advantages with the aid that CSS3 transition tutorials provide, especially to novice webmasters. The primary benefits can be seen on the site itself where it can interactive, and interesting since the browsing experience that the users or visitors of the site will be remarkable, compared to the typical look of most of the websites online. Pseudo-Elements Animation and transitions It is easy and simple to customize your animations. Simple Icon Hover Effects It comes with CSS for animation and transitions for your website. Caption Hover Effects This app comes with a stylish hover, which has effects an on image captions. Dynamic Grid with Transitions Nifty Modal Window Effects A Collection of Page Transitions

Smooth scrolling back-to-top link • Dreamdealer With jQuery it's very easy to create a smooth scrolling back-to-top button on your website. Add a button on your page, somewhere near the bottom of your page. My back-to-top button is visible when you scroll down more than 800 pixels and it stays in the viewport due to a stay-in-view-script I wrote. Select code < a href = "#top" class = "toTopLink" >< span > Jump back to top < / span >< / a > And style this button. But all the magic happens in a simple and clean jQuery function: The magic happens in the formula that sets the animation speed. But with this formula, it takes the current scroll position and devides it with three to ensure a smooth and steady scroll speed, no mather where you are on the page. Play with the subdevision to get faster or slower scrolling speeds. There's one extra part to this script and that's the show-when-scrolled-further-than-x-pixels script. Select code $ ( window ) . bind ( 'scroll' , function ( ) { checkScrollPos ( ) ; } ) ; checkScrollPos ( ) ;

CSS Tutorial

Related: