Little CSS Stuff Newcomers Get Confused About

Nobody was born understanding CSS. We all struggled our way through the confusion. Good times, good times. Let's think back on those confusing moments, that are probably confusing people as we speak. I'll list some that I remember and you list yours.
Avatar of Chris Coyier
Chris Coyier on (Updated on )

Identity at Mozilla

Direct Link

New project from Mozilla team to tackle the long-standing issue of single-signon (not needing a unique login/pass for every single app in the world). I love it when apps have “Sign in with Twitter”, but I’m not sure Twitter should …

Avatar of Chris Coyier
Shared by Chris Coyier on

The Actual Browser Problems with Unquoted Attributes

There are rules when it comes to leaving your attribute values unquoted in HTML. Then there are the actual problems that are caused by breaking them. Then there are problems that can happen outside of those rules. Yeah it's kinda complicated but I've tried to document it here.
Avatar of Chris Coyier
Chris Coyier on (Updated on )

Test if at least one checkbox is checked

In this example, a submit button is disabled if none of the checkboxes are checked and enabled if at least one is checked.

<form>
   <!-- bunch of checkboxes like: -->
   <input type="checkbox" ... >
   <input type="checkbox" ... >

   <!-- submit 
Avatar of Chris Coyier
Chris Coyier on

Apply Custom CSS to Admin Area

Add to the functions.php file:

add_action('admin_head', 'my_custom_fonts');

function my_custom_fonts() {
  echo '<style>
    body, td, textarea, input, select {
      font-family: "Lucida Grande";
      font-size: 12px;
    } 
  </style>';
}
Avatar of Chris Coyier
Chris Coyier on (Updated on )

Spinny Leaf Menu

<nav>
  <ul class="top-menu">
    <li><a href=#>Home</a><div class="menu-item" id="home"></div></li>
    <li><a href=#>Catalog</a><div class="menu-item" id="cataloge"></div></li>
    <li><a href=#>Price</a><div class="menu-item" id="price"></div></li>
    <li><a href=#>About</a><div class="menu-item" id="about"></div></li>
    <li><a href=#>Contact</a><div class="menu-item" id="contact"></div></li>
  </ul>
</nav>
nav {
	width: 960px;
	height: 100px;
	margin: 120px auto;
	text-align: center;
}
.top-menu li {
	
Avatar of Chris Coyier
Chris Coyier on

Non-Form Fieldset Look

<section class="fieldset"<h1This is not a fieldset</h1<pBooyah!</p</section
.fieldset {
  position: relative;
  border: 1px solid #ddd;
  padding: 10px;
}

.fieldset h1 {
  position: absolute;
  top: 0;
  font-size: 18px;
  line-height: 1;
  margin: -9px 0 0; /* half of 
Avatar of Chris Coyier
Chris Coyier on (Updated on )

Progress Element in Firefox

Direct Link

The <progress> element has landed in the Firefox nighties, one of the new HTML5 forms related elements. Of particular note is that they exposed the ability to style it via pseudo elements right away. Mounir Lamouri fills us in:

Avatar of Chris Coyier
Shared by Chris Coyier on