ALEX HOLT: Designer and Digital Technical Director

Hello, my name is Alex.

I've been a web and digital designer, developer and creative for over 10 years.

Until recently I was the Digital Technical Director at Exposure, an award winning integrated marketing agency in London. Now I'm freelancing.

»
around 2 years ago

Creating an accessible navigation menu from a UL

»
around 2 years ago

Create a simple Ajax RSS Widget with Jquery

»
around 2 years ago

Is code validation important in web design?

»
around 2 years ago

Quick Tip: Grounding a site design in Google Chrome

»
around 2 years ago

Concept: Semantic Markup

»
around 3 years ago

Coda Plugin: HTML Word Counter

»
around 3 years ago

Web standards, should we really care?

»
around 4 years ago

I hate spam bots. But i hate captcha more.

»
around 4 years ago

Digital Color Meter..

»
around 5 years ago

Why I ditched Google Analytics for Clicky..

»
around 5 years ago

Photo libraries are devaluing photographers..

»
around 5 years ago

Pixel Perfection – What a dumb idea.

»
around 5 years ago

Django, Nginx + Memcached

Creating an accessible navigation menu from a UL

Styling the nav of a site is something we do.. well, everytime we build a site.

The nav of a site is one if the most important (and often most neglected) elements. So what can we do to make sure our nav is as accessible as possible?

To start with, we create the markup for our navigation..

<ul class="nav">
    <li><a href="/">Home</a></li>
    <li><a href="about/">About</a></li>
    <li><a href="contact/">Contact</a></li>
</ul>

Obviously you can put as many or few items as you need into the list.

Now to style the list…. first we’ll style it horizontally:

ul.nav,ul.nav li,ul.nav li a
{
    display:block;
    float:left;
    margin:0;
    padding:0;
}
ul.nav li a
{
    padding: 4px 8px;
    text-decoration: none;
    background: #ccc;
    border: 1px solid #999;
    margin-right: -1px;
}
ul.nav li a:hover
{
    background: #f90;
    color: #fff;
}

and now vertically, just to show how it works…

ul.nav,ul.nav li,ul.nav li a
{
    display:block;
    margin:0;
    padding:0;
}
ul.nav li a
{
    padding: 4px 8px;
    text-decoration: none;
    background: #ccc;
    border: 1px solid #999;
    margin-bottom: -1px;
}
ul.nav li a:hover
{
    background: #f90;
    color: #fff;
}

Obviously, you have the freedom to apply any CSS you want to the blocks..

«