by the way, z-index controls layer order and wouldn't have much impact if the elements were all displayed inline.
if think of your elements as being made up of sheets of paper stacked ontop of each other z-index is their order in that stack. the default behaviour is the first element in the source has the lowest z-index and the last has the highest - if you had two absolutely positioned elements overlapping the one with the highest z-index would be nearest the top of the 'pile'.