admin

Archive for the ‘Uncategorized’ Category

cufón vs. @font-face

In Uncategorized on July 8, 2010 at 1:21 pm

Okay, I just did my first “cufón vs. @font-face” comparison and cufón ended up looking way better. These tests are from my online resume where I have been using cufón for quite some time to display the headers in the Kon Tiki Kona font (you won’t be able to tell the difference unless you are viewing this article on its own; if you view it from the front page of the blog both images will appear squished):

@font-face Test

font-face test

cufón Test

cufón test

Conclusion

Unless I can find a way to get lettering displayed with the CSS @font-face property to turn up clearer I may be forced to stick with cufón for now.

The Oft-overlooked Overline

In Uncategorized on June 19, 2010 at 2:36 pm

When I started learning about CSS in 1999 one of the CSS values I learned about was that of overline for the text-decoration property. It didn’t seem to have much to use it for but I did stumble across one website where overline and underline effects were added to links when hovered over.

The Lion King - Title Treatment

A short time later I started a site at http://radio.lionking.org and since the title treatment for this animated film has an overline effect in it I decided to add one with CSS to the title of my site. The H1 for the title is as follows:

<h1>R<span>ADIO</span> L<span>ION KIN</span>G</h1>

Using my old school CSS techniques from “The Year 2000″ I set the base font-size for the H1 to 70 pixels (I might change it to an em-based sizing sometime) then set anything wrapped within a SPAN in the H1 to 75% of that. Then the second SPAN (the one that needs the overline effect) has text-decoration: overline; applied to it. The result, which turned out quite well, can be seen below or at the site: Read the rest of this entry »

HTML & CSS: The Good Parts

In Uncategorized on May 26, 2010 at 7:36 pm

HTML & CSS: The Good Parts

In twelve-plus years of working with HTML I’ve noticed that many web developers take a crash course in it, learn a few basics, then “move on” to the “real stuff.” While HTML is admittedly easy to learn and not super difficult to master there are still many concepts relating to it which seem to be ignored or are maybe completely unheard of in the web development world. When these concepts are grasped they significantly increase productivity, clarity of code, ease-of-maintenance, etc. But so many people seem content to live without these benefits. In my own development experience I’ve come to be aware of many of these concepts but thought they were too idiosyncratic to bring up to other people. But the book I’m currently reading, HTML & CSS: The Good Parts by Ben Henick and published by O’Reilly Press, crystallizes my thought process on these matters and shows that they really are important to sites of any size. This is not a book to learn HTML or CSS from. It exists at an intermediate or perhaps advanced level but any serious web developer wanting to perfect their coding practices will benefit from reading this book. As I write this I am on page 68 in the book so I may add more to this entry later.

The circular DIV

In Uncategorized on February 5, 2010 at 12:58 am

Looking through some coupons for my local grocery store I saw what hit my web developer’s eye as a circular DIV and I wondered if I could create it in HTML/CSS. I realized that it would make sense to make a square DIV (equal width and height) with a border radius set to half of what the value is for the width and height which would then turn each complete corner of the square into a curve and four curves would meet up and form a perfect circle. Even then I imagined I might have to go through a couple hours of fine-tuning to perfect it, if it was even going to work at all, but it turned out to work perfectly right away, with the usual caveat that it only works in browsers that support the border-radius property, or some proprietary variant thereof (i.e., not IE).

For those readers viewing this on a browser with decent CSS support the following style rules:

  1. {
  2. background-color: #BD8B00;
  3. border: 3px solid #990000;
  4. width: 200px;
  5. height: 200px;
  6. -moz-border-radius: 100px;
  7. }

should produce a perfectly circular DIV here: Read the rest of this entry »

The Rumors of the Death of XHTML Have Been Greatly Exaggerated

In Uncategorized on September 1, 2009 at 10:45 pm

Just found this web comic at Smashing Magazine which attempts to clear up some of the misunderstandings about XHTML and HTML 5.

Web Comic
Read the rest of this entry »

Cooliris/flickr

In Uncategorized on July 31, 2009 at 9:37 pm

Cooliris/flickr Example

So, I just found out about Cooliris recently even though it’s been around for a while. I downloaded the plugin and tried out some of their code to get flickr albums to show up in it and I got one working. Here’s an example that you will see if you have the plugin installed (Continue reading…): Read the rest of this entry »

Fun with Mozilla Transform

In Uncategorized on July 1, 2009 at 12:36 am

Firefox 3.5 just got released and with the upgrade has come some enhanced CSS support. The thing that’s capturing my attention first is the -moz-transform property that basically allows you to spin web page elements in two- and three-dimensional space (although 3D transformations are not supported yet; sorry, Z-axis). There is also a Webkit version (for Safari and Chrome) named: -webkit-transform. These are both proprietary versions of the W3C-recommended transform property, which is only for transforming elements in two-dimensional space.

Let’s look at an example. Here is the blog’s logo with a border added to its DIV and a little text thrown in so you can see better what’s happening when it gets transformed:

And here is the logo transformed: Read the rest of this entry »

Tables and Forms

In Uncategorized on May 18, 2009 at 11:39 pm

In my prior entry entitled Tables vs. Tables I reminded us all, myself included, that the W3C says that web authors are allowed to use HTML tables to lay out forms. This flies in the face of much conventional “wisdom” that says HTML tables are never to be used for anything. But it struck me not too long ago that forms really ARE tables that are simply waiting for some of their data to be filled in.

Allow me to illustrate. Here is a simple table that I don’t think anyone would argue really is a table:

Example #1

Table

First Name: Donald
Last Name: Duck
Address: 1313 Duck Lane
Occupation: Sailor
Girlfriend: Daisy

Example #2

Form

Now, what if we remove half the information, leave half the information, and wait for a user (Donald Duck, presumably) to fill in the remaining half: Read the rest of this entry »

Introducing Grufón

In Uncategorized on April 20, 2009 at 2:36 pm

I’m often finding or stumbling across new front end development techniques on the web, some of which I make a mental note to use sometime in the future and some of which I want to use right away. I recently found out about the grunge text effect at Janko Jovanovic’s blog and added it in to this CMZ Media Developer blog about an hour ago. The effect currently shows up on the headers from level two through four (H2H4); I may add it to other elements later on.

This technique utilizes a transparent PNG placed as the background image in a SPAN you include in the element you want to add the effect to. Since that will validate but it’s still a little on the hacky side I made it a little less hacky by using jQuery to write the SPAN in, like so:

  1. jQuery(‘H3,H4′).append(‘<span></span>’);

Read the rest of this entry »

Cufón – Initial Thoughts

In Uncategorized on April 8, 2009 at 12:12 am

So I just implemented the new Cufón for the first time. I can’t show the page it’s on right now because that page is only in staging at the moment (UPDATE: the effect can now be seen on this blog as well as at my online resume and personal site). Cufón is a technique like sIFR for using unique fonts on a webpage. The Cufón page claims that sIFR is “painfully tricky to set up and use,” but I always found sIFR to be pretty simple and straightforward and setting up Cufón seemed to take just as much time. The new jQuery sIFR is even better.

So, what is good about Cufón? Well, it seems to work faster than sIFR and it seems to be better than sIFR at handling larger blocks of text. You also don’t seem to need extra CSS to use Cufón.

Are there any drawbacks? Yes, the main one I can think of now is that, as far as I can tell, you can’t copy and paste Cufón text whereas sIFR text was copyable and pastable. Um, that’s the only one I can think of right now (in addition to the previously stated fact that the setup wasn’t simpler than sIFR’s setup), but it’s a big one. Here’s hoping the next version of Cufón addresses this issue.