Recent Events - the digital journal for Sam Hampton-Smith
Where does all the time go?

Where does all the time go?

the 25 hour day will be the death of me

This is supposed to be my online journal, but in truth I barely get time to eat let alone sit and share my "wise words of wisdom".

Semantically correct dhtml menus

Multi-tier semantic menu

version 1.1 in development

I've started working on version 1.1 of the semantic menu - supporting additional features such as multi-tiered menus, improved tabbing and automatic set up, along with less stringent requirements for giving everything prescribed IDs. I've got the basic beta up and running and it's available here.

Nice inbound links

Jeffery Zeldman linking

Hits go mad

Jeffery Zeldman of ALA fame is linking through to my semantic menu. Hits are understandably rolling in. It's also quite bizarre the effect that page has had on google. Within two days of posting the page up it appears in the top 10 results for variations on "xhtml menu", "drop down menu css" and "how to xhtml menu". Some quite good terms I would have used myself! According to stats over 50% of people visiting the page are bookmarking it too :o).

Semantically correct dhtml menus

The art of semantics

creating a semantically correct menu

I recently needed to create a dhtml menu for a client, but they were using a platform that made life awkward - especially when combined with our policy of standards-compliant xhtml coding. Said client was using mac OS9, with their browser of choice being IE5.1.

I did the regular thing of checking around the usual sources for anything hackable, but nothing really struck my attention. So I set about creating a semantically correct menu using xhtml, css and as little javascript as possible - it had to work on IE5.1 so fancy v6 code won't necessarily cut the mustard.

Setting a footer at the bottom of a three column layout

Stetching the content

css, 3 columns, and the ongoing saga of footers

I recently needed to create a three column layout in the style of oscommerce. I got that one down jiggy, but the footer was proving a pain to automatically position at the bottom of the three columns when two of them had no height.

I came up with a javascript fix that works across all browsers on Windows, Mac & Linux (versions 5 and above) based on an article I read on ALA.

 function inherit() {
   if (document.getElementById) {
     col1 = document.getElementById("leftmenu");
     col2 = document.getElementById("centrecol");
     col3 = document.getElementById("rightmenu");
     var content = document.getElementById("content");
     var footer = document.getElementById("footer");
     if (col1.offsetHeight>col2.offsetHeight)
      	var myHeight=col1.offsetHeight
     else
     	var myHeight=col2.offsetHeight
     if (col3.offsetHeight>myHeight)
     	myHeight=col3.offsetHeight
     content.style.height = myHeight + 'px';
     footer.style.display = 'block';
     return true
   }
 } 
		

Feel free to nick the code if you like - it just gets the tallest of the three columns, and sets the column height of the holding div to the height of the tallest - works for me :o)