diff --git a/src/calibre/ebooks/oeb/stylizer.py b/src/calibre/ebooks/oeb/stylizer.py index 0557a1f74d..d2583b95ba 100644 --- a/src/calibre/ebooks/oeb/stylizer.py +++ b/src/calibre/ebooks/oeb/stylizer.py @@ -528,7 +528,7 @@ class Style(object): base = parent.width else: base = self._profile.width - if 'width' is self._element.attrib: + if 'width' in self._element.attrib: width = self._element.attrib['width'] elif 'width' in self._style: width = self._style['width'] @@ -551,7 +551,7 @@ class Style(object): base = parent.height else: base = self._profile.height - if 'height' is self._element.attrib: + if 'height' in self._element.attrib: height = self._element.attrib['height'] elif 'height' in self._style: height = self._style['height']