Graphic CSS Menu

I’ve been wanting to do this one for a while and finally had a few
minutes to put it together so I hope someone finds it useful. This is
about using graphics for menu buttons and has nothing to do with any
action. It’s all done manually using text links and CSS, there’s not
a graphic box in sight.

I see posts from people struggling with stacks of graphic menu
buttons and whether they need to be grouped, layered, unlayered etc.
While this example is nothing new (no reinventing the CSS wheel here)
I think a lot of users may not be aware of alternative methods. This
example is based on a client design I did recently.

While it’s easy enough to understand the concept behind stacked
images for different link states and its apparent simplicity to
execute it has some major drawbacks:

  1. Completely useless for inline layouts.
  2. A semantic dead-zone (read: not very search engine friendly).
  3. A lot of code and layout clutter due to the multiple divs needed
    for each link state.

Using CSS to achieve the same end result is far more elegant and
doesn’t suffer from the above problems. In fact, probably the best
argument for this approach is that it allows the use of lists for the
menu which from the point of view of a search engine makes your page
more tasty.

This example assumes at least a basic understanding of CSS and the
structure of lists though even if you’re new to this stuff please
take the time to pick apart the example, it’s not difficult and
you’ll probably be glad you did. It may appear like a lot of work
compared to drawing graphic boxes on a page but the fact is a lot of
the CSS is repetitive so once you grasp the basic idea it’s easy and
the benefits are many.

You could probably work through the instructions online but I suggest
downloading the file since it helps to pick things apart if you get
stuck. If you find any problems with the instructions let me know as
it was done rather quickly.

My online example: http://anoptic.com/demo/css_menu/index.html
Download: http://anoptic.com/demo/css_menu/Graphic_CSS_Menu.zip
Requires FW 5, though the technique will work no matter what program
you use.

Todd


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Todd, your example is good, but I would suggest adding a version where the background of each list item changes color also. Would be more dramatic.


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I agree but I don’t have the time right now to change it. If I get a chance I’ll try to update the images.

Todd

On Aug 4, 2008, at 11:16 AM, chuckamuck wrote:

Todd, your example is good, but I would suggest adding a version where the background of each list item changes color also. Would be more dramatic.

Here’s a slight code variation on the same basic idea that I hand-
coded. It adds an “active” state to the mix. Sorry, no FW file
available but all the CSS is in the Head tag for those interested.

http://anoptic.com/demo/inline_block/index.html

Todd


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 4 Aug 2008, 3:50 pm, Todd wrote:

I’ve been wanting to do this one for a while and finally had a few
minutes to put it together so I hope someone finds it useful.

Todd,

really useful just to be able to see the structure used in the FW file

thanks for the hard work

I find this kind of demo much easier to follow and ultimately understand than a pdf manual

Cheers Gary


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Gary and Dan J.,

I’m glad you’re finding it helpful Gary. It pains me when people fight with stacks of images when there’s a much cleaner and better way to do it.

Todd

On Aug 5, 2008, at 4:12 PM, diarbyrag wrote:

Todd,

really useful just to be able to see the structure used in the FW file

thanks for the hard work

I find this kind of demo much easier to follow and ultimately understand than a pdf manual

Cheers Gary

Hi Todd
I’ve been reading back through the whole Freeway Talk site trying to improve my knowledge. Was really interested in this thread but dissapointed to find the links no longer work. Any chance of a new link?
Kevin


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On Sep 16, 2010, at 4:45 AM, Kevin McElligott wrote:

Hi Todd
I’ve been reading back through the whole Freeway Talk site trying to
improve my knowledge. Was really interested in this thread but
dissapointed to find the links no longer work. Any chance of a new
link?

Hi Kevin,

Sorry about that, there’s been a lot of moving around since that was
posted. This link works, <http://xiiro.com/demo/css_graphic_menu/index.html

Todd


tutorials mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options