Posts Tagged ‘CSS’

Five Ways to Keep Your Code Clean

Tuesday, February 23rd, 2010

Because we have a team of developers here at eROI and a plethora of projects to build and maintain, it is more than likely that the code written by one individual will need to be edited by another developer at some point in time.  When an edit to a site comes in, the original author of the code will inevitably, at one point or another, be on vacation, be sick, or no longer work here (yes, it happens, sadly).  This is why it is so imperative for our team (and any development team) to follow certain guidelines to keep our code clean and legible, so that anyone can jump onto a project, easily see what the code is doing, and start making edits quickly.  Here are five ways to keep your code readable and maintainable:

  1. Indent Your Code
    This is number one on the list for a reason.  No other thing you can do can help or hinder the readability of your code than the indentation style (or lack thereof).  Nested child elements should be indented one level more than parent elements in order to show a visual hierarchy.  Opening and closing tags in HTML should be on the same indentation level in most cases; items inside the opening/closing tags need to be indented one additional level.

    (more…)

Love Your Scrollbars

Thursday, February 11th, 2010

Recently one of our designers came by and and asked me about how much actual control we could have over the aesthetics of scrollbars. I told him what I often respond with: “If you can design it, we can build it.”

Although this statement is fundamentally true, stylizing scrollbars creates a unique set of obstacles. Since scrollbars are handled by the browser window itself and not the website, controlling their appearance and functionality becomes more work than simply using CSS to skin the elements. Fortunately, there are plenty of options out there but finding the right one for your project isn’t always easy.

Styling scrollbars with CSS

One way to start stylizing the scrollbar attributes is to use CSS. A quick cross-browser test will show you that this isn’t a viable route. Ironically (to us developers) Internet Explorer is the only browser to fully support the scrollbar attributes allowing for an easy, quick way to customize your scrollbars’ look and feel. This may have been acceptable when IE had a 90% browser market share but those days are over and let’s face it — the designers pushing for these changes all use Macs.

(more…)

AEA: The One About Coding

Friday, May 15th, 2009

Let me start off by saying that I had an AWESOME time while attending An Event Apart. From my first ever train ride to all of the food consumed to all of the conference sessions, it was an event worth attending. So many experts in the field presenting AND presenting in a manner that actually had entertaining moments (read: not boring). An Event Apart is a conference I will be happy to attend in the future.

That being said, my blog post about coding techniques learned at AEA will probably be the driest post to date. Here we go…

(more…)

Big Beautiful Backgrounds

Friday, November 14th, 2008

Gosh, we sure are lucky to be making websites for the world wide internets these days.  Not only do we have advanced CSS, widgets, and fancy javascript doohickeys, but we have an audience with broadband connections, modern browsers, higher screen resolutions and bigger monitors!  Which gives us all the reason in the world to design sites with BIG, BEAUTIFUL BACKGROUNDS.

No longer are we trapped by solid colors or boring repeating 1kb GIF backgrounds (not that people don’t do amazing things with simple backgrounds).  Now we can slap gigantic JPGs or PNGs (or SWFs) on our body tags or wrapper divs and get away with it.  And you don’t even have to be building a fancy artist site, either.

(more…)