Issue Bug Closed

#36541in css hard-coded margin-left (or right) of 510px for "csc-textpic-text" in layout 25 and 26

Kurt Kunig 04/25/12, 11:54 updated 10/23/17, 22:20

Description

If you want to show an image with the look and feel of “intext-right-nowrap” e.g. you will have the layout

# intext-right-nowrap
   25 = TEXT
   25.value = <div class="csc-textpic csc-textpic-intext-right-nowrap###CLASSES###">###IMAGES######TEXT###</div>
# intext-left-nowrap
   26 = TEXT
   26.value = <div class="csc-textpic csc-textpic-intext-left-nowrap###CLASSES###">###IMAGES######TEXT###</div>

the result is:

<div id="c38" class="csc-frame csc-frame-frame1">
  <div class="csc-textpic csc-textpic-intext-left-nowrap">
     <div class="csc-textpic-imagewrap">
     <div class="csc-textpic-text">
  </div>
</div>

with a hard-coded margin-value like:

.csc-textpic-intext-left-nowrap .csc-textpic-text { margin-left: 510px; } in line 109 of the implemented standard-css of TYPO3

In former versions the margin was calculated based on the width of the inserted image!!!
So you have to correct this in your own template with:

tt_content.image.20.layout {
    # intext-right-nowrap
    25 = TEXT
    25.value = <div class="csc-textpic csc-textpic-intext-right-nowrap###CLASSES###">###IMAGES###<div style="margin-right:{register:rowWidthPlusTextMargin}px;">###TEXT###</div></div><div class="csc-textpic-clear"><!-- --></div>
    25.insertData = 1
    # intext-left-nowrap
    26 = TEXT
    26.value = <div class="csc-textpic csc-textpic-intext-left-nowrap###CLASSES###">###IMAGES###<div style="margin-left:{register:rowWidthPlusTextMargin}px;">###TEXT###</div></div><div class="csc-textpic-clear"><!-- --></div>
    26.insertData = 1
}

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.