Bug #56105
closedimage position below: No margin-bottom if more than one image
0%
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
Updated by Christian Clemens almost 11 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...
Updated by Felix Kopp about 10 years ago
- Subject changed from No margin-bottom under last image to image position below: No margin-bottom if more than one image
Updated by Frank Nägler about 10 years ago
can reproduce this, the CSS set this explicit to margin-bottom: 0;
Updated by Riccardo De Contardi almost 9 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
Updated by Riccardo De Contardi over 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.
Updated by Riccardo De Contardi over 7 years ago
- TYPO3 Version changed from 6.2 to 7
Updated by Susanne Moog over 7 years ago
- Tags set to CSS, HTML
- Complexity set to medium
Updated by Susanne Moog over 7 years ago
- Sprint Focus set to On Location Sprint
Updated by Anja Leichsenring about 7 years ago
- Sprint Focus deleted (
On Location Sprint)
Updated by Susanne Moog about 7 years ago
- Category changed from Content Rendering to Frontend
Updated by Riccardo De Contardi about 7 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.