Category Archive: CSS
Posts about CSS
CSS Dark Pre Tag Styles
Here is a quick CSS snippet for adding some smooth, dark styles to any <pre> tag. One-step snippet for complete pre styling: add to your stylesheet and done.
CSS Viewport Tricks
Note to self: you can specify various viewport properties such as initial-scale and user-zoom via <meta /> tags or directly via CSS.
CSS box-sizing all elements
The CSS box-sizing property makes it much easier to work with elements that have padding and borders. Here is a ruleset that will apply the box-size property to all elements.
CSS reveal nofollow links
In this quick post, you’ll see how to use CSS attribute selectors to reveal any nofollow links included in your web pages.
CSS text-shadow snippets
Here are some of my favorite/most-used CSS text-shadow snippets.
CSS Style Pre Tags
I enjoy writing about HTML pre tags. In this post, I share some basic CSS to help style your pre tags for both screen and print media.
Center div
Round-up of some common ways to center divs with CSS: horizontal center, vertical center, and both horizontal and vertical center. Nine techniques!
Notes on @media queries
Just a couple of notes for working with CSS @media queries: two ways to write media queries and how to query portrait vs. landscape orientation.
Basic Code for Image Slider
Here is the basic code required for making a simple image slider. It provides a good starting point for rolling your own sliders, carousels, and so forth.
Nice little input button with CSS
Just making a note of the CSS used to make a nice little input button, leftover snippet from a previous project.
CSS Multiple Media Queries
@media queries are instrumental in creating responsive CSS designs. This tutorial explains how to combine multiple media queries to keep things optimized.
Remove Linked Image Borders in IE
Internet Explorer has a nasty habit of displaying honking blue borders on linked images. This post shows a quick way to disable them using a slice of jQuery.