[TYPO3-content-rendering] CSS Styled Imgtext
Christopher
bedlamminusspamhotel at gmail.com
Mon Jul 4 20:12:52 CEST 2005
Martin Kutschker wrote:
> Yes, but an image is for the W3C a block level element.
>
> And redeclaring a span to a block level element with CSS doesn't improve
> the "correctnes". To the contrary, it degrades the readabilty of your
> markup.
>
> I won't mind if you use such code for your projects, but I oppose such
> usage in any TYPO3 default code.
>
I'm inclined to agree, except that <img> is not considered by w3c to be
either _only_ block level or _only_ inline:
"4.3 Replaced elements
A replaced element is an element which is replaced by content pointed to
from the element. E.g., in HTML, the 'IMG' element is replaced by the
image pointed to by the 'SRC' attribute. One can assume that replaced
elements come with their own intrinsic dimensions. If the value of the
'width' property is 'auto', the intrinsic width is used as the width of
the element. If a value other than 'auto' is specified in the style
sheet, this value is used and the replaced element is resized
accordingly (the resize method will depend on the media type). The
'height' property is used in the same manner.
Replaced elements can be either block-level or inline."
http://www.w3.org/TR/REC-CSS1#replaced-elements
In practice, all browsers that I know of define images as inline
elements by default (i.e. they do not force a new line when inserted in
text).
-Christopher
More information about the TYPO3-project-content-rendering
mailing list