background preloader

Ten more CSS tricks you may not know

Ten more CSS tricks you may not know
Our article, Ten CSS tricks you may not know has proven to be such a success that we decided it was time to offer you ten more CSS tricks that you may not know. 1. Block vs. inline level elements Nearly all HTML elements are either block or inline elements. The characteristics of block elements include: Always begin on a new line Height, line-height and top and bottom margins can be manipulated Width defaults to 100% of their containing element, unless a width is specified Examples of block elements include <div>, <p>, <h1>, <form>, <ul> and <li>. Begin on the same line Height, line-height and top and bottom margins can't be changed Width is as long as the text/image and can't be manipulated Examples of inline elements include <span>, <a>, <label>, <input>, <img>, <strong> and <em>. To change an element's status you can use display: inline or display: block. 2. padding: 2em; border: 1em solid green; width: 20em; width/**/:/**/ 14em; 3. 4. IE has a rather strange way of doing things. 5. 6. 7.

Related:  CSS3

How to create CSS style sheets for printing Learn how to use CSS to make a printed page look as good as your on-screen page. Justin James shows you what he did to make this work for one of his development projects. I've been working on a personal project for some time called Rat Catcher. (You can read about my development work on the project in my 10-part series about the OutSystems Agile Platform.) The end goal of any usage of Rat Catcher is to produce a report, and it occurred to me that users might want to print their reports. For a long time now, the sites I've worked on used fluid layouts that worked flawlessly with printers, but Rat Catcher is a different beast.

Choose Your GUI Toolkit Find Your GUI Toolkit for Pythonbased on your preferences PyGUI, Tkinter, Easygui, wxPython, PythonCard, pyQt, pyGtk, Jython (Swing & AWT), Anygui, FXPy, pyFLTK; which one is for you? All of these toolkits are good. Tune back in as we explore them further. Meanwhile, here is a brief summary of some of the many options available: This is a non-exhaustive list and new options are sprouting up all the time.

40 Sets of Free Social Media Icons This post was originally published a few years ago. Some of the icon sets showcased in the original post are no longer online, so we’ve updated the post by removing the dead links and outdated icon sets. We’ve added many new icon sets as new social media sites are always popping up and many of the older sets didn’t include icons for sites like Pinterest that are now very popular. Design trends also change over time, and we’ve added links to a number of sets that use a trendy flat style of design. Designers love free icon sets. Having quality icons can help to make a site’s design look complete, and can also help with the usability of the site. Create a Masked Background Effect With CSS Today we're going to be stepping through a really cool technique you can use to create an effect that's a little bit like parallax scrolling, yet doesn't need any JavaScript; it can be achieved very simply through pure CSS. Start by checking out the live demo to see what you're going to learn (you'll need to view on a desktop/laptop to see the effect). This technique could be used to create great product description pages, or even something akin to a Powerpoint/Keynote presentation, and would be a great potential fit for online story illustration.

ICONS: Home Page ANNOUNCE (1st July 2013) ICONS 2.0 Released: Adds support for libraries containing PNG image data.Adds support for directories/folders containing GIF/PNG image files. Enhanced viewIcons: Interface now uses ttk widgets.Adds support to display images from directories/folders containing GIF/PNG image files. ICONS is a package intended to provide a cross platform icon/image support for GRIDPLUS, but can also be used as a stand-alone package for Tcl/Tk programmers. The source for the icon images can be either libraries (See below) -or- folders contaning GIF/PNG image files. A utility for displaying the contents of the libraries -or- folders of image files (viewIcons) is included with the package.

Implementing the Float Label Form Pattern Using Matt Smith’s mobile form interaction design as a guide, we will create a stunning form interaction for the web that’s both beautiful and accessible using HTML, CSS and JavaScript. Overview Form design and interaction on the web can be a sensitive subject. A multiplicity of form accessibility concerns and best practices can make designing a compelling form interaction very difficult, as opposed to form design on native platforms. Matt Smith recently created a compelling form interaction he posted to Dribbble:

Everything You Need to Know About the CSS will-change Property Introduction If you’ve ever noticed “that flicker” in WebKit-based browsers while performing certain CSS operations, especially CSS transforms and animations, then you’ve most likely come across the term “hardware acceleration” before. The CPU, GPU, and Hardware Acceleration In a nutshell, Hardware acceleration means that the Graphics Processing Unit (GPU) will assist your browser in rendering a page by doing some of the heavy lifting, instead of throwing it all onto the Central Processing Unit (CPU) to do.

5 Design Techniques to Incite User Emotion by Sylvia MLewis on 03/05/14 at 3:01 pm For years, designers have focused on traditional design factors such as meeting web standards, organizing navigation, choosing layouts and fonts. However, the design world has evolved and inciting user emotion is more possible than ever. Designers can now create user interfaces that give users a complete experience by not only meeting their needs or presenting them with beautiful aesthetics, but offering them something more that touches their emotion. Here are some ingredients you can use to spice up your UI and deliver an emotional and mind-blowing user experience. Add Personality with Comic Illustrations

Cascading SVG Fill Color One time someone told me their biggest problem with SVG icons is that they didn't match the color of text they were by. In fact it was such a big problem for them, that despite seeing the advantages of SVG icons they were sticking with icon fonts. I didn't think of it at the time, but there is a pretty easy solution for this. The idea is to use the currentColor value in CSS to pass that text color through to the SVG shapes. For instance: <h1><svg viewBox="0 0 32 32"><use xlink:href="#icon-phone"></use></svg> Call Me </h1>

Latest 20 Best Color Tools for Web Designers Web designing is totally a different task from web developing. But there are only a few people who know this fact. Website designing is totally related to the design of the website like colors, fonts, header style, banner designing, footer style and many more things. A web designer requires a lot of time to give a perfect design to a website. CSS Flip Animation You've all asked for it and now I've added it: Internet Explorer support! Annoyingly enough, the change involves rotate the front and back elements instead of just the container. Skip to this section if you'd like the Internet Explorer code. IE10+ is supported; IE9 does not support CSS animations. CSS animations are a lot of fun; the beauty of them is that through many simple properties, you can create anything from an elegant fade in to a WTF-Pixar-would-be-proud effect.

Best Practices for Designing Effective Banner Ads If you’ve ever been online — which, if you’re reading this, I assume you have — you’ve probably encountered a banner advertisement or two. These typically come in the form of a prominent image on the page, although the exact size, positioning and content can differ drastically. There’s more to creating a banner ad than just opening up a new Photoshop canvas and throwing together some pictures though. In this article, we’re going to take a look at banner advertising and investigate just what creating a strong ad is all about. What Are Banner Ads? Banner ads are one of the principle forms of advertising on the web today and, for many sites, a fundamental source of revenue.