Project

General

Profile

Actions

Bug #35814

closed

Centering Images in Text with Image does not work due to missing style

Added by Steffen Ritter over 12 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Must have
Category:
Frontend
Target version:
Start date:
2012-04-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

the classes for centering use margin:0 auto; but the width is not set for the container element. therefore centering does not work.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #36541: in css hard-coded margin-left (or right) of 510px for "csc-textpic-text" in layout 25 and 26Closed2012-04-25

Actions
Actions #1

Updated by Patrick Broens over 12 years ago

A max-width is set, using $styles.content.imgtext.maxW. When using a setup with multiple columns in different widths, this value is the same for every column. The max-width should be removed. The width of the div or figure with the class "csc-textpic-imagewrap" should take the width of the content. The only current solution I see is to use "display: table", but this is not supported by IE <= 7. I'm going to look for other solutions.

Actions #2

Updated by Patrick Broens over 12 years ago

There is a floating method to do this, but it is quite ugly, because you need to introduce extra divs where the outer one gets float: right; right: 50%; and the inner one float: right; right: -50%; I've discussed this with Berit and Sven Wolfermann and until now we think this is the only solution. Sven is going to have a better look at it. I've implemented this already in the TypoScript of css_styled_content. If Sven comes with better solutions, we'll use that one.

Actions #3

Updated by Gerrit Code Review over 12 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10256

Actions #4

Updated by Gerrit Code Review over 12 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/10268

Actions #5

Updated by Gerrit Code Review over 12 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10303

Actions #6

Updated by Patrick Broens over 12 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Ronald Wopereis over 12 years ago

the solution provided broke two of our websites
because of the overflow: change from visible to hidden.

imagine a left side container with two elements:
one is a local menu
and below that is a csc-textpic text with image.

now since the overflow is hidden, the BFC is no longer created.
result is the text with image is positioned next to, instead of below, the first element (localmenu)

our solutions today is to overrule the overflow:hidden with the overflow:visible for this container.

any other solution welcome !
best regards, Ron

Actions #8

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF