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 almost 7 years ago.
Description
the classes for centering use margin:0 auto; but the width is not set for the container element. therefore centering does not work.
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.
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.
- Status changed from Accepted to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
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
- Status changed from Resolved to Closed
Also available in: Atom
PDF