Simian Design, by Tony Stephens

  • elsewhere

    • Hidden Drawers

      Great article on the ways secret compartments in furniture can be made and found.

      May 29 at 3:56 pm
    • Pulp Fiction Pop-ups

      Gorgeous photos of pulp fiction books with the covers cut and popped-out.

      May 23 at 12:21 pm
    • The Quest For Every Beard Type

      I've been growing a beard every winter for some years now, and every spring, I try to see how many facial hair variations as I can check off from the chart of

      May 22 at 3:38 pm

Pixels to Ems Conversion

A really great chart to determine the Pixels to Ems Conversion Table for CSS. Thank you Jon Tan.  A quick over-view/sampling below.

px font-size em equivalent 1px in ems
11 0.689 0.091
12 0.750 0.083
14 0.875 0.071
16 1.000 0.063
18 1.125 0.056
20 1.250 0.050

What this chart allows you to do is determine the em width of something. Say you have something that is 770px wide, and using a font-size of 1em. You know then that the em-width of the layout is: 1 ÷ 16 × 770 = 48.125em.

10 best CSS hacks

The 10 best CSS hacks is a great list. Defintely worth checking out.

  1. Vertical align div
  2. Min-height
  3. PNG Transparency
  4. Autoclear
  5. Reset CSS (incredibly important)
  6. Scrolling Render IE
  7. Opacity
  8. PRE Tag
  9. LI Background Repeat IE
  10. Targeting Browsers

Good stuff.

Reset CSS

Eric Meyers Reset CSS has found a permanent home now. Reset CSS is a useful tool to help you default a lot of generic styles built into browsers.

” The reset styles given here are intentionally very generic. There isn’t any default color or background set for the body element, for example. I don’t particularly recommend that you just use this in its unaltered state in your own projects. It should be tweaked, edited, extended, and otherwise tuned to match your specific reset baseline. Fill in your preferred colors for the page, links, and so on.”

Also be sure to check out his diagnositic css file as well.

“With a diagnostic stylesheet, you can quickly see where your markup might have some trouble. If you want to see this in action, there are two demos to check out:”

Incredibly useful tools, check them out.

Identify links with CSS and Icons.

Poolie Studios has a nice collection off icons that he uses to iconify links.  This process is a fairly lightweight, unobtrusive way to show what your links are.

a[href$=”.pdf”] { BLAH BLAH } is the core of the it all.  This CSS selector object (easily done via jQuery for older browsers) allows you to showcase exactly what your links are.

I’m not 100% positive that this is always a good idea, but this is a nice collection of icons that fit the link sizes, and thus I’m linking it to you.

Spruce up your search box

d’bug has a nice writeup on recreating the search field using CSS.

Normally I wouldn’t be a giant fan of changing the default input/form fields in a browser.  I think having those standards that everyone recognizes and know how to use is a powerful tool. Deviating too much from them is a risky proposition at times.   At least in my opinion it is.
But that being said, his end result is nice.  It seems to work.  And as a concept piece it’s cool. Go check it out.

Grid Calculator

Grid Calculator allows you to choose the font size you are going to use, and then select the number of columns, column width, and gutter width based on that base font size. As you fiddle with the dimensions, the total width is dynamically updated, so you can check that you haven’t gone over that magic 1024px!

Very easy and convienant for your fixed-width layouts.

CSS Reset Reloaded

Eric Meyer, CSS Guru gives us a run down on some extreme CSS Reset. Think of these as a starting point for creating your own defaults, in addition to being a way to illuminate the nature of browser defaults.

“That’s much of the point here: that this is not a case of “everyone must use these styles in a certain way without alteration”. Nor am I saying that everyone must use them or else be cast into darkness. Remember before that I termed these “my take on the topic of reset styles” (emphasis added). Your take may be subtly or greatly different. Think of these as a starting point for creating your own defaults, in addition to being a way to illuminate the nature of browser defaults. Simply the act of taking those defaults into consideration and thinking about them closely puts you ahead of 99% of your peers. I do think that reset styles are quite useful; otherwise, I wouldn’t have written about them here, and certainly not to the extent that I have. My hope is that people will use them as a launch pad for their own resets and for deeper thinking about styling and browsers.”

It’s a small chunk of code to simplify things, and make your life easier.  You should try this out and see if it’s for you.

A CSS Sticky Footer

A sticky footer, that is, a footer that sticks to the bottom of the browser window, has been traditionally a pain.   Well, this guy has come up with an elegant and working CSS-based footer that has been tested in IE 5 and up, Firefox, Safari and Opera.

Setting Type on the Web to a Baseline Grid

From A List Apart: Setting Type on the Web to a Baseline Grid.

“We web designers get excited about the littlest things. Our friends in the print world must get a kick out of watching us talk about finally being able to achieve layouts on the web that they’ve taken for granted for years. Let’s face it: it’s easier these days to embed a video on the web than it is to set type consistently or align elements to a universal grid.”

A nice writeup to an odd problem that does plague sites.

Some good CSS techniques.

Montoya writes about some CSS techniques he uses all the time.  There are some good gems in here.

The initial base css files he starts with are from  Starting with CSS: Revisited.  I like the full resetting and stating of many elements here.

/* =INITIAL
v2.1, by Faruk Ates - www.kurafire.net
Addendum by Robert Nyman - www.robertnyman.com */

/* Neutralize styling:
Elements we want to clean out entirely: */
html, body, form, fieldset {
margin: 0;
padding: 0;
font: 100%/120% Verdana, Arial, Helvetica, sans-serif;
}

/* Neutralize styling:
Elements with a vertical margin: */
h1, h2, h3, h4, h5, h6, p, pre,
blockquote, ul, ol, dl, address {
margin: 1em 0;
padding: 0;
}

/* Apply left margin:
Only to the few elements that need it: */
li, dd, blockquote {
margin-left: 1em;
}

/* Miscellaneous conveniences: */
form label {
cursor: pointer;
}
fieldset {
border: none;
}
input, select, textarea {
font-size: 100%;
	}

Montoya also mentions an important setting I think is a good one.  Line-height. (line-height:1.4) Setting the default line-height does increase readability, and that’s a good thing.
The next section is the one I found as new.

html { font-size:100.01%; }
body { font-size:1em; }

Setting the font-size to 100.01% fixes some problems. The explanation for this comes from “CSS: Getting Into Good Coding Habits:”

This odd 100.01% value for the font size compensates for several browser bugs. First, setting a default body font size in percent (instead of em) eliminates an IE/Win problem with growing or shrinking fonts out of proportion if they are later set in ems in other elements. Additionally, some versions of Opera will draw a default font-size of 100% too small compared to other browsers. Safari, on the other hand, has a problem with a font-size of 101%. The current “best” suggestion is to use the 100.01% value for this property.

The rest of the article does go into some good topics, well worth the read.  Safe fluid columns, browser filtering, property ordering are some of those topics.  Nice write-up Montoya.