Project

General

Profile

Actions

Bug #56105

closed

image position below: No margin-bottom if more than one image

Added by Christian Clemens about 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2014-02-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
CSS, HTML
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

Tested with TYPO3 6.2beta4:

If I add a content element "text with image" with only one image (position: below), then a margin-bottom:10px is added to:

div.csc-textpic .csc-textpic-imagewrap .csc-textpic-image {margin-bottom: 10px;}

If I add a content element "text with image" with two images beside each other or below each other (again with position: below), then there is no such margin-bottom. In the result, the text is directly below the images - see attached screenshot.

In TYPO3 4.5.32 the margin-bottom exists.


Files

screenshot_margin_bottom.jpg (63.8 KB) screenshot_margin_bottom.jpg Christian Clemens, 2014-02-19 10:04
Actions #1

Updated by Christian Clemens about 10 years ago

I'm sorry: the title of this task is not correct, should be something like this "image position below: No margin-bottom if more than one image". Can't change this...

Actions #2

Updated by Felix Kopp over 9 years ago

  • Parent task set to #61842
Actions #3

Updated by Felix Kopp over 9 years ago

  • Subject changed from No margin-bottom under last image to image position below: No margin-bottom if more than one image
Actions #4

Updated by Frank Nägler over 9 years ago

can reproduce this, the CSS set this explicit to margin-bottom: 0;

Actions #5

Updated by Riccardo De Contardi over 8 years ago

I performed a little test; here are my findings:

1) TYPO3 6.2.15

when you have one image only , the image has a margin-bottom, set with the css rule:

div.csc-textpic .csc-textpic-imagewrap .csc-textpic-image{margin-bottom:10px}

No matter if you select "image below" or "image above" (where it would be more useful IMO).

When you have for example 2 images on 2 columns, the row where the images are has the class csc-textpic-imagerow-last that sets the margin to 0:

 div.csc-textpic div.csc-textpic-imagerow-last, div.csc-textpic div.csc-textpic-imagerow-none div.csc-textpic-last{margin-bottom:0}

2) 7.6.1-dev (latest master); fluid content elements

when you select the "images above", no matter how many images are there or the number of columns: the block where the images are have a margin-bottom, set with:

.ce-above .ce-gallery{margin-bottom:10px}

when you select "images below" there is a similar behavior, but the margin is on the top:

.ce-below .ce-gallery{margin-top:10px}

So I think that this issue can be considered solved for version 7 and fluid content elements, that have a more correct behavior

Actions #6

Updated by Riccardo De Contardi about 7 years ago

I've repeated a test on both 7.6.16 and 8.7.1 (latest master); the issue is still present on both with CSS_STYLED_CONTENT.

The proposed patch on #65843 is to modify the Typoscript with the following line:

tt_content.image.20.rendering.singleNoCaption.lastRowStdWrap.wrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-last"> | </div>

Results: the patch works, as the margin-bottom will be removed; but it will also be removed in the "image, above" cases.
As I wrote, if you have 2 or more images, you always have no margin-bottom so at least the behavior with the patch will be more consistent.

Actions #7

Updated by Riccardo De Contardi about 7 years ago

  • TYPO3 Version changed from 6.2 to 7
Actions #8

Updated by Riccardo De Contardi almost 7 years ago

  • Parent task deleted (#61842)
Actions #9

Updated by Riccardo De Contardi almost 7 years ago

  • Parent task set to #61834
Actions #10

Updated by Susanne Moog almost 7 years ago

  • Tags set to CSS, HTML
  • Complexity set to medium
Actions #11

Updated by Susanne Moog almost 7 years ago

  • Sprint Focus set to On Location Sprint
Actions #12

Updated by Anja Leichsenring over 6 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #13

Updated by Benni Mack over 6 years ago

  • Parent task deleted (#61834)

Frontend-related

Actions #14

Updated by Susanne Moog over 6 years ago

  • Category changed from Content Rendering to Frontend
Actions #15

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from New to Closed

I think that this should be closed for now; it will not be added to version 8, as it will be a breaking change and will break existing websites that rely on that behavior.
Moreover, css_styled_content will be removed since the next major TYPO3 version.

As I wrote on my comment n°6, the solution proposed on #65843 (which consists in one line of TypoScript) will partially solve the problem, making the behavior more consistent.

If you think that this is the wrong decision please reopen it or open a new issue with a reference to this one. Thank you.

Actions

Also available in: Atom PDF