[TYPO3-dev] css_styled_content makes wrong markup

Steffen Kamper steffen at sk-typo3.de
Fri Feb 29 20:26:36 CET 2008


Hi,

with the no wrap options of Text/image the markup is semantical wrong.

Here is the markup with text beside, right

<!--  CONTENT ELEMENT, uid:22/textpic [begin] -->
  <a id="c22"></a>
  <!--  Image block: [begin] -->
   <div class="csc-textpic csc-textpic-intext-right-nowrap"><div 
class="csc-textpic-imagewrap"><dl class="csc-textpic-image 
csc-textpic-firstcol csc-textpic-lastcol" style="width:296px;"><dt><img 
src="uploads/pics/filter.png" width="296" height="97" border="0" alt="" 
/></dt></dl></div><div style="margin-right:306px;"><div 
class="csc-textpic-text">
  <!--  Header: [begin] -->
   <div class="csc-textpicHeader csc-textpicHeader-25"><h1 
class="csc-firstHeader">Test</h1></div>

  <!--  Header: [end] -->

  <!--  Text: [begin] -->
   <p class="bodytext">this is a text<br /></p>
  <!--  Text: [end] -->
   </div></div></div><div class="csc-textpic-clear"><!-- --></div>
  <!--  Image block: [end] -->

 <!--  CONTENT ELEMENT, uid:22/textpic [end] -->

As you see the header is anywhere inside the element, but to be semantic 
correct, header has to be the first element. If you disable css it's wrong 
order.

I always copy these lines from installation to installation to correct this:
tt_content.textpic.10.if >
tt_content.textpic.20.text.10 >

The second is the anchor which is unnecessary and also can cause problems 
with css. In this case it would be enough to have
<div class="csc-textpic csc-textpic-intext-right-nowrap" id="c22">
and all browsers are able to jump to this section instead of some dinosaurs

vg  Steffen







More information about the TYPO3-dev mailing list