'Parses a style attribute. The code within a CSS selector block or in
the style attribute of an HTML element.
@return: A dictionary with one entry for each property where the key
is the property name and the value is the property value.'

def parse_style_properties(self, props):

    prop = dict()
    for s in props.split(';'):
        l = s.split(':', 1)
        if (len(l) == 2):
            key = l[0].strip().lower()
            val = l[1].strip()
            prop[key] = val
    return prop
