W3C home > Mailing lists > Public > www-style@w3.org > January 2000

Re: Inline formatting model document

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Thu, 27 Jan 2000 21:40:45 +0000 (GMT)
To: Matthew Brealey <thelawnet@yahoo.com>
cc: www-style <www-style@w3.org>
Message-ID: <Pine.GSO.4.04.10001272133420.16575-100000@mary.bath.ac.uk>

On Wed, 26 Jan 2000, Matthew Brealey wrote:
>> I know that neither Opera not Mozilla currently underline images as
>> they should.
> No no no.

Yes yes yes. ;-)

If 'text-decoration' is applied to a SPAN element which contains,
amongst other things, some text, then all the contents of the SPAN
should be underlined, since the underlining spans all descendants.

Thus:

   <span style="text-decoration: underline">
      <em>some text</em>
      <img src="..." alt="an image">
      <em>some text</em>
   </span>

...would result in:

   some text [X] some text
   -----------------------

...and not:

   some text [X] some text
   ----------   ----------

Note that the EM and IMG elements do not have 'text-decoration' set.
The underlining does not apply to the IMG element at all, since it is
not _set_ on the IMG element. According to CSS2:

# If the property is specified for a block-level element, it affects
# all inline-level descendants of the element. If it is specified for
# (or affects) an inline-level element, it affects all boxes generated
# by the element.

Thus every box inside an element which has 'text-decoration' set to
'underline', regardless of whether it is an inline level or a block
level element, will be affected. Including IMG elements, which
generate boxes just like any other element.

-- 
Ian Hickson                            ("`-''-/").___..--''"`-._   
http://www.bath.ac.uk/%7Epy8ieh/        `6_ 6  )   `-.  (     ).`-.__.`)
                                        (_Y_.)'  ._   )  `._ `. ``-..-' fL
Member, Mozilla Quality Assurance     _..`--'_..-_/  /--'_.' ,'
Browser Standards Compliance Team    (il).-''  (li).'  ((!.-'    
Received on Thursday, 27 January 2000 16:42:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:03 GMT