Posts Tagged ‘Design’

HonuStudios.com gets an HTML5 and CSS3 makeover

29 January 2010 by Bret

After experimenting with actual HTML5 tags and not just the doctype on Johnny Knight’s website, we decided to give our main site and this blog a little HTML5 and CSS3 makeover. So we converted the navigation to nav tags and the header and footer to header and footer tags.

For us it’s not about jumping on the latest in geeky coding trends, although it’s fun to learn new stuff. It’s more about cleaner, leaner, and prettier code. When it comes to coding, it’s always the goal to be able to do more with less. Which is why we’ve wholeheartedly embraced CSS rounded corners and drop shadows. It’s always a pain to create the graphics for something that seems so easily done in the browser.

As part of the makeover we changed the menu around and on the CSS side of things we added a semi-transparent box behind the links and a white drop shadow to give the menu a bit of a glow. To do the semi-transparent box we used the CSS background-color property setting it to rgba(36,62,115,0.5) the ‘a’ is for alpha, or the opacity channel, here were setting it to 50% opaque.

To finish the makeover, we decided to top the whole sundae off with a little CSS3 animation cherry up in the header on our main site. To see the animated cloud goodness though, you’ll have to have Safari, Chrome or Webkit.

Why we chose HTML5 and CSS3 for our latest project.

20 January 2010 by Bret

Our latest project and the first of 2010 was a redesign of a site I did several years ago for my friend and client, Johnny Knight. Johnny is a talented Los Angeles based DJ and artist.

From Joomla! and XHTML to WordPress and HTML5

When I redesigned the site several years ago I switched to Joomla! because of the “module” positions and the non-blog way that content is organized. But Joomla! is complicated to learn for most clients and it can be a pain to work with. Since that redesign, WordPress has really become much more than a blog engine, it’s become more of a versatile CMS, so I switched the site back. Switching is easy to do when there isn’t a lot of content. The site was pretty much a place to showcase Johnny’s remixes and announce event dates. Back then XHTML and CSS2 was the way to go so that’s what I used.

Why HTML5 and CSS3?

Given the ability to play and use more cutting edge code, we decided to fully go with HTML5 and CSS3. HTML5 is the way of the future but it’s still young and new and not yet fully supported by the current Internet Explorer, but there’s a way around that. We’ve been using the HML5 doctype and CSS3 styles and effects for months, but that’s where our adoption stopped. With Johnny’s site though we decided to take a chance and go all the way with the structural markup.

The advantages of HTML5 are numerous, but for a blog the big advantage is the structure that HTML5 element tags like header, article, section, nav and footer bring to the document. No longer do you need to mark up a page with this familiar code:

<!DOCTYPE html>
<html lang="en-us">
<head>
</head>
<body>
<div class="header">
  <h1>Shasta's Cookie Cart</h1>
  <div class="menu">
    <ul>
      <li><a href="#">Home</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Contact</a></li>
    </ul>
  </div>
</div>
<div class="content">
  <div class="post">
    <h2>Post Title</h2>
    <p class="date">Post Date</p>
    <p>Post copy in here.</p>
  </div>
  <div class="post">
    <h2>Post 2 Title</h2>
    <p class="date">Post 2 Date</p>
    <p>Post 2 copy in here.</p>
  </div>
</div>
<div class="footer">
  <div class="menu">
  <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">About</a></li>
    <li><a href="#">Contact</a></li>
  </ul>
  &copy; 2010 Shasta's Cookie Cart
  </div>
</div>
</body>
</html>

Now HTML5 brings logical, semantic markup that not only makes sense to the geeks but to search engines, screen readers and other not so geeky folks. Without being too geeky the above code would turn into:

<!DOCTYPE html>
<html lang="en-us">
<head>
</head>
<body>

<header>
  <h1>Shasta's Cookie Cart</h1>
  <nav>
    <ul>
      <li><a href="#">Home</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Contact</a></li>
    </ul>
  </nav>
</header>

<section>
  <article>
    <header>
      <h2>Post Title</h2>
      <p class="date">Post Date</p>
    </header>
    <p>Post copy in here.</p>
  </article>

  <article>
    <header>
      <h2>Post 2 Title</h2>
      <p class="date">Post 2 Date</p>
    </header>
    <p>Post 2 copy in here.</p>
  </article>

</section>

<footer>
<nav>
    <ul>
      <li><a href="#">Home</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Contact</a></li>
    </ul>
&copy; 2010 Shasta's Cookie Cart
</nav>
</footer>

</body>
</html>

Once the HTML5 code was in place we styled the site with some CSS3 markup. We’ve been using CSS3 markup for awhile now to do cool things like rounded corners, drop-shadows and reflections, so that wasn’t as new for us as using HTML5 markup for the site. Unfortunately Internet Explorer doesn’t currently support CSS3, we’ll just have to wait for version 9 for full support. However, Safari, Mobile Safari, Firefox, Chrome, and Opera do, so why not use it? It won’t look bad to IE users, just…plain. Though IE9 promises more support.

Summation

So to sum it all up, HTML5 and CSS3 are great, new, shiny, and make a designers day. We’re beginning to use both in our day to day work for clients as we can.

Johnny Knight is open to cutting edge stuff, a great DJ, and can also be found on Twitter @djjohnnyknight.

Internet Explorer users won’t see all the shiny HTML5 and CSS3 coolness just yet, but they’ll still see your content and be able to navigate the site just fine. Ultimately it’s up to our clients when it comes to things like CSS3, most are cool with it and don’t mind that some can’t see the coolness. It’s kind of like wearing a pair of KangaROOS®, some people don’t see the cool factor. But, those that do, appreciate the statement of fashion and the sweet hidden pocket.