background preloader

25 CSS Snippets for Some of the Most Common and Frustrating Tasks

25 CSS Snippets for Some of the Most Common and Frustrating Tasks
In this post we have 25 CSS snippets and hacks that will solve many of the most frequently used and, at times, frustrating CSS development tasks. Why reinvent the wheel when there are already plenty of time-saving pre-written CSS code snippets? As well as some classic and timeless CSS hacks you will also find many CSS3 snippets, like box-shadow, border-radius,linear-gradient and many more. Adding shadow to text – text-shadow Helps make your text stand out from the rest. Source Adding an image-based border – border-image You can create any kind of border you want for any object(s) on your website using this. Adding shadow to borders and images – box-shadow Helps make your borders and images “pop” from the background more, giving a subtle 3D-like visual cue that it’s something separate, in the foreground, and the thing that visitors should be looking at. Adding rounded corners – border-radius Self-explanatory. Adding individual rounded corners – border-radius Adding a gradient – linear-gradient

Adapt.js - Adaptive CSS In defense of CSS hacks — introducing “safe CSS hacks” How do you target Internet Explorer in your CSS? Do you use CSS hacks, conditional stylesheets or something else? It’s the perfect trollbait. There have been plenty of discussions about this, and I don’t mean to start a new one. People have been advocating three different approaches: conditional stylesheets, CSS hacks, or conditional classnames. Conditional stylesheets Conditional comments make it very easy to specify stylesheets that should only be loaded in Internet Explorer, or even in specific versions of that browser. This snippet will cause lte-ie-8.css to be loaded in IE8, IE7, IE6 and even in IE5. If you want to use this technique to style an element differently in specific versions of Internet Explorer, it’d look something like this: Pros The conditional comments snippet is valid HTML. Cons Performance decreases due to the multiple additional HTTP requests, depending on the browser. Conditional classnames This allows you to keep your browser-specific CSS in the same file: CSS hacks

Implementing bookmarklets in JavaScript Bookmarklets are little plugins for your browsers: JavaScript programs packed into javascript: URLs that you add to your bookmarks and start by clicking on them. They perform an operation on the currently open web page such as submitting it to Twitter. There are even bookmarklets that transform the current web page, for example, to add icons that, when clicked, add an event to Google Calendar. A separate post explains what bookmarklets are in more detail. This post tells you how to implement bookmarklets. It presents techniques, tools, and patterns for doing so. Preparation and techniques Firebug: helps you with trying out your JavaScript program in the same environment that the bookmark will eventually run in. Don’t pollute the global namespace: You don’t want to mess up the environment of the web site “in which” your bookmarklet is executed. Develop in strict mode: If you switch on strict mode, JavaScript warns you about more potential problems. Collect input Producing output Escaping

25 Incredibly Useful CSS Snippets for Developers CSS is no doubt up there with the most important web languages that we use. While html provides the structure it can be inconsistent and unpredictable across different new and old browsers. Css is where the html is styled though, and where we get creative as well as addressing those inconsistencies. Below is a fantastic list of 25 Css snippets that I am sure you will find extremely useful. Whether you are a veteran web developer, or are just getting your foot in the door of css, they are all well worth checking out. Hide text with text indent This is extremely useful for use for things such as your company logo. Style links depending on file format This snippet is aimed at user experience. Remove textarea scrollbar in IE Internet Explorer has an annoying habit of adding scrollbars to textarea’s even when the textarea’s content is not overflowing. Drop cap Commonplace these days in blogs and news sites is the dropcap. Css Transparency Css Reset by Eric Meyer Image preloader Google Font API

25 Super Web-based HTML & CSS Tools HTML and CSS are the two most commonly used languages on the web. While it may not be the most advanced form of web development, every website made in the past decade uses both languages. Needless to say, there’s a lot to learn here, but that doesn’t mean tools can’t help. As of now, HTML5 and CSS3 specifications are frequently changing. CSS3 Please CSS3 Please! With all the browser-specific CSS3, it’s no doubt that anyone would get tired of having to essentially re-write a slightly modified line of code to accommodate just one browser. css3please takes care of this trouble by offering an incredibly easy way to generate proper markup to suit all browsers. CSS3.0 Maker CSS3.0 Maker This is one more great CSS3 markup generator. BonBon Buttons BonBon Buttons With everything from dynamic gradients and shadows right around the corner, the internet is seeing less images being necessary to generate beautiful buttons. Ultimate CSS Gradient Generator Ultimate CSS Gradient Generator CSS Typeset PX to EM

56 Pure CSS Effects Javascript Alternatives Including Demos | Designs Mag (Designs Magazine) Cascading Style Sheet (CSS) is a document format which provides a set of style rules which can then be incorporated in an XHTML or HTML document. It is a means to separate web content from formatting and presentation information. Although CSS is generally considered a simple and straightforward language, sometimes it requires creativity, skill and a bit of experimentation. The good news is that designers and developers worldwide often face similar problems and choose to share their insights and workarounds with the wider community. This is where we come in. We are always looking to collect such articles for our posts so that we can deliver the most useful and relevant content to our readers. Hope you like this post, Please don’t forget to , and like our for recent updates. Naaz 55 Unique jQuery Techniques and Tutorials Nowadays websites are relying more on HTML5, CSS3 and JQuery for animation and If you are a part of ... 28 Excellent HTML 5 & CSS3 Tutorials and Techniques

Colors in Web Design: An Exploration Creating the perfect color palette for each design project can be a time-consuming task. We might settle on a color scheme, only to change our minds five minutes later. Sometimes we’ll feel like we’ve found a solid set of colors, but don’t know how to make them work together in the project we’re working on. Sometimes it seems like we don’t have enough colors or too many colors or the wrong combination of colors. How is it that some web designers seem to be able to come up with the perfect color combinations in the work they produce? We’re going to explore some of the most popular colors being used in modern web design in the hopes of understanding why certain colors are used for particular websites. Why Color Matters Color is a strong influencing factor in design and in the world around us. Some people may trust a company more simply by their brand colors. When Color Doesn’t Matter We obsess over our color selections ad nauseam. Color Is Powerful Red Web Designs Café Rouge Carrot Media LBi

3 astuces CSS fort utiles Voici quelques astuces CSS assez utiles, mais très peu utilisées. Au menu : Bien utiliser <HTML> et <BODY>Appliquer un style à tous les éléments.Donner plusieurs « class » à un élément Bien utiliser <HTML> et <BODY> <HTML>, comme tout autre élément, peut être personnalisé via les CSS. Appliquer un style à tous les éléments. Il est possible d’appliquer un style général à tous les éléments, via * Cette technique est utilisée par certaines feuilles de Reset CSS, pour appliquer des marges intérieurs et extérieures de 0 par défaut sur tous les éléments. Donner plusieurs « class » à un élément Il est possible de donner plusieurs valeurs à un attribut class, ce qui permet de gérer plus proprement certains éléments. avec comme résultat « texte rose et souligné« . edit : comme l’a noté Kazhar dans les commentaires, il faut nommer ses classes CSS en fonction de l’utilité de l’élément, mais pour le coup, il me fallait un exemple facile à comprendre, et à expliquer

Diễn Đàn Xổ Số - Lô Gan - Xổ Số Miền Bắc - Kết quả Xổ Số - Diễn Đàn Xổ Số Vui
Hải Âu và những người bạn
Dòng Họ Người Việt
Cao đẳng nghề by mutian Dec 7

Related: