background preloader

Clean and pure CSS FORM design

Clean and pure CSS FORM design

LESS « The Dynamic Stylesheet language CSS navigation menu It's truly remarkable what can be achieved through CSS, especially with navigation menus. Using the immense power of CSS, we're going to turn this: ...into this: All with just a bit of CSS and this tiny image: (which we've called background.gif). Look very closely and you can see it! The HTML code for our CSS menu <div id="nav-menu"> <ul> <li><a href="#">Services</a></li> <li><a href="#">About us</a></li> <li><a href="#">Contact us</a></li> </ul> </div> That's it! Removing the bullets First thing we'll do is remove the bullets, by creating a new CSS rule: The important CSS command is the first one, list-style: none, which says that we don't want any kind of bullet in our navigation menu. With this new CSS rule our menu now looks like: Needs a bit of work, right? Displaying the menu items inline To get these menu items all on to one line we'll insert this CSS rule: The float CSS command is the really important one here as that aligns the menu items up against each other. Now we're getting there!

The Semantic Grid System: Page Layout For Tomorrow - Smashing Magazine Advertisement CSS grid frameworks can make your life easier, but they’re not without their faults. Fortunately for us, modern techniques offer a new approach to constructing page layouts. But before getting to the solution, we must first understand the three seemingly insurmountable flaws currently affecting CSS grids. Problems Problem #1: They’re Not Semantic The biggest complaint I’ve heard from purists since I created The 1KB CSS Grid two years ago is that CSS grid systems don’t allow for a proper separation of mark-up and presentation. Floated elements must also be cleared, often requiring unnecessary elements to be added to the page. <div class="grid_3"> 220 </div><div class="grid_9"> 700 </div><div class="clear"></div> Problem #2: They’re Not Fluid While CSS grids work well for fixed-width layouts, dealing with fluid percentages is trickier. But when .grid_3 appears inside of a .grid_6 cell, the percentages must be recalculated. Problem #3: They’re Not Responsive Blame It On The Tools

CSS Design: Taming Lists As early as July of 1999 I was pontificating on email lists about the virtues of style sheets. Some things never change. Article Continues Below What has changed is how I think about CSS, and the underlying structure of (X)HTML to which it is applied. For example, I find that most pages on the web contain a menu of links in a navigation area. Of course the reason that we don’t mark them up in that way is that we don’t want a bullet in front of every link in our navigation area. In this article, I’ll demonstrate how to use CSS to bring unwieldy lists under control. Setting the stage#section2 For purposes of this article, I am using unordered lists. <ul><li>Item 1</li><li>Item 2</li><li>Item 3</li><li>Item 4</li><li>Item 5 we'll make a bit longer so that it will wrap</li></ul> Each list is simply placed inside a different DIV, and the CSS is written so that the list’s behavior is determined by the DIV it is in. Item 1Item 2Item 3Item 4Item 5 we’ll make a bit longer so that it will wrap

Flash QRcode reader as3 – kasperkamperman.com : creative media technology [update] Paul Hinrichsen pointed me to a new implementation of a QRCode Reader (Adobe Native Extension) build by Sbhave. It works BRILLIANTLY and VERY fast. It is built for Flex but there is also a build for Flash CS6 which is easy to set up. Google code project page: QRcode reader implementation that uses the QRCode Reader by Logosware (Libspark project). Modifications Implemented Adaptive Threshold by Quasimondo (Mario Klingemann) in the GetQRimage Class.Added the substract blur method that Mario Klingemann explains in his lecture about the process of reading QR codes. The user interface uses the minimalcomps by Keith Peters (bit-101) and the Hi-Res! Example (Flash Player 10 or higher) Generate a QRcode and print it out. Used resources Download : ReadQrSimple – source code Download : ReadQrMobile – source code (version tested on Galaxy S2, by Paul Hinrichsen).

URL dispatcher A clean, elegant URL scheme is an important detail in a high-quality Web application. Django lets you design URLs however you want, with no framework limitations. There’s no .php or .cgi required, and certainly none of that 0,2097,1-1-1928,00 nonsense. See Cool URIs don’t change, by World Wide Web creator Tim Berners-Lee, for excellent arguments on why URLs should be clean and usable. Overview To design URLs for an app, you create a Python module informally called a URLconf (URL configuration). This mapping can be as short or as long as needed. Django also provides a way to translate URLs according to the active language. How Django processes a request When a user requests a page from your Django-powered site, this is the algorithm the system follows to determine which Python code to execute: Django determines the root URLconf module to use. Example Here’s a sample URLconf: Notes: Example requests: A request to /articles/2005/03/ would match the third entry in the list. Named groups Performance

Top 10 Mobile Web Development JavaScript Frameworks By Jacob Gube Creating web apps and sites for the Mobile Web has its own sets of challenges and techniques. From UIs optimized for fingers instead of mouse cursors to the bandwidth limitations that most portable personal devices have, developing for mobile devices requires a paradigm shift for those of us who’ve traditionally created products aimed at desktops. To help you rapidly deploy cross-platform mobile apps and websites, there’s a wide range of JavaScript frameworks you can take advantage of. Some common characteristics of JavaScript mobile web development frameworks: Optimized for touchscreen devices: Fingers as input devices instead of mouse cursors provide an extra set of challenges in user interface design. In this article, you’ll find my top picks of JavaScript mobile web development frameworks you should consider using to build your next mobile web app or website. 1. jQuery Mobile 2. 3. 4. 5. xui.js 6. 7. zepto.js 8. 9. 10. Other JavaScript Libraries for Mobile Web Development

python-weather-api - A python wrapper around the Yahoo! Weather, Google Weather and NOAA APIs The module provides a python wrapper around the Yahoo! Weather, Weather.com and NOAA APIs. Authors: Eugene Kaznacheev <qetzal@gmail.com> Joshua Tasker <jtasker@gmail.com> (pywapi - Python Weather API) From source Download the latest pywapi library from: Untar the source distribution and run: $ python setup.py build $ python setup.py install View the trunk at: Check out the latest development version anonymously with: svn checkout python-weather-api-read-only Yahoo! Use the following function, that fetches weather report from Yahoo location_id: A five digit US zip code or location ID. units: type of units. Returns: weather_data: a dictionary of weather data that exists in XML feed. Weather.com Use the following function, that fetches weather report from Weather.com More examples Script import pywapiimport string

python-twitter - A python wrapper around the Twitter API GitHub is now the "source of truth" but I will always try to update to this project page. A Python wrapper around the Twitter API Author: The Python-Twitter Developers <python-twitter@googlegroups.com> Introduction This library provides a pure Python interface for the Twitter API. Twitter ( provides a service that allows people to connect via the web, IM, and SMS. Building From source: Install the dependencies: Download the latest python-twitter library from: Extract the source distribution and run: $ python setup.py build $ python setup.py install Testing With setuptools installed: $ python setup.py test Without setuptools installed: $ python twitter_test.py Getting the code View the trunk at: Documentation Using Todo

Best CSS Forms CSS has transformed the way forms used to get designed. CSS helps you make really good and attractive forms. Prior to this (CSS) the forms found on the web were very boring and were not able to attract a lot of visitors. Attractive or user-friendly forms can divert a lot of attention to itself. Even a simple form designed on CSS look slick and stylish. 1- Good Looking Form Without Table This tutorial will explain how to design good form using clean CSS design with only label and input tags to simulate an HTML table structure. 2- Nice & Simple Contact Form Simple CSS Forms is an easily-customizable forms setup that helps you create quick prototypes and final products of web sites. 3- CSS Globe Web Form Styles CSS Globe offers 5 web form styles, ranging from dark-and-slick to fun handwritten to old-fashioned letter envelope and more. 4- Semantic Horizontal Form 5- Veerle’s Blue CSS Form A simple blue form with rounded background corners, all styled in CSS and XHTML. 7- Simple CSS Forms

Prettier Accessible Forms It can be time consuming to make web forms both pretty and accessible. In particular, laying out forms where the form label and input are horizontally adjacent, as in the image below, can be a real problem. We used to use tables, which worked well in this scenario—but forms don’t constitute tabular data, so it’s a semantic faux pas Article Continues Below I’ve tried to create a form-styling solution that is both accessible and portable (in the sense that I can move the code from one project to the next). Marking up the form#section1 The most important part of a form is the HTML we use to build it. fieldset and legend#section2 The fieldset element allows us to group form controls into logical, related “chunks.” legend then allows us to add a caption to that fieldset, which helps users understand the context of the form controls contained within that fieldset. label#section3 Let’s look at a simple fieldset example (line wraps marked » -Ed Styling the form#section4 Bugs#section5 We’re done.

Django tips: laying out an application Continuing the theme of dealing with common questions from the Django mailing lists and IRC channel, today we’ll look at how to organize the various bits of a Django-based project or application. Projects versus applications This is really more of a separate (though related) question, but understanding the distinction Django draws between a “project” and an “application” is a big part of good code layout. Roughly speaking, this is what the two terms mean: An application tries to provide a single, relatively self-contained set of related functions. An application is allowed to define a set of models (though it doesn’t have to) and to define and register custom template tags and filters (though, again, it doesn’t have to). Default project-level file layout When you run django-admin.py startproject, Django will automatically create a new directory containing four files: __init__.py, which will be empty. manage.py and __init__.py should be left alone. Default application-level file layout

A Simple Step-by-Step Reportlab Tutorial The subtitle for this article could easily be “How To Create PDFs with Python”, but WordPress doesn’t support that. Anyway, the premier PDF library in Python is Reportlab. It is not distributed with that standard library, so you’ll need to download it if you want to run the examples in this tutorial. There will also be at least one example of how to put an image into a PDF, which means you’ll also need the Python Imaging Library (PIL). As I understand it, Reportlab is compatible with Python 2.x, IronPython and Jython. They are currently working on a port for Python 3.x (or will be soon). Installation Reportlab supports most of the normal Python installation methods. Creating a Simple PDF Reportlab has decent documentation. In Reportlab, the lowest-level component that’s used regularly is the canvas object from the pdfgen package. from reportlab.pdfgen import canvas c = canvas.Canvas("hello.pdf") c.drawString(100,750,"Welcome to Reportlab!") That was easy! A Little Form, Little Function

(full) easy authentication, using django.contrib.auth (end) 7. Templates are here, ordered as in urls.py provided in the previous post: - accounts/base.html <html><head></head><body> {% block content %} {% endblock %} </body></html> - accounts/login.htnl - accounts/logged_out.html {% extends "accounts/base.html" %} {% block content %} <p>You have been logged out. - accounts/password_change_form.html - accounts/password_change_done.html {% extends "accounts/base.html" %} {% block content %} <p> Password successfully changed. - accounts/password_reset_form.html - accounts/password_reset_done.html {% extends "accounts/base.html" %} {% block content %} An email have been sent to you, with the instructions to follow. {% endblock %} - accounts/password_reset_confirm.html - accounts/password_reset_complete.html {% extends "accounts/base.html" %} {% block content %} Password reset done. - accounts/password_reset_email.html - accounts/signup_form.html - accounts/signup_done.html - accounts/signup_complete.html - accounts/signup_email.html 8. -- Peyman

Related: