[TYPO3-dev] text/img and img elements with css-class?

Peter Russ peter.russ at 4many.net
Thu Nov 20 01:02:04 CET 2008


--- Original Nachricht ---
Absender:   grac at gmx.ch
Datum:       19.11.2008 16:51:
> hi peter
> 
>>> so here are my questions:
>>> - is there a possibility to integrate a field "CSS class" into the
>>> content-elements text/img and img?
>>> -is this possibility already implemented in vers. 4.2.3?
>>> -or is such a thing planned for these two elements?
>>> -or are img in typo3 only supposed to have a width in px?
> 
> 
>> IMHO this is not required as in a layout/design the possible size of
>> images should be defined.
> 
> 
> sorry, but i completely disagree:
> yes, they should be defined (in percent), and no, the should not have a 
> fixed width.
> 
> web2.0 and modern design require amongst other topics the adaptability 
> of a layout to different viewport sizes.
> think of a fixed layout of 800px on a screen with the width of 1900px: 
> you just don't see a thing any more...
> 
> therefore an elastic layout has to grow and shrink depending on 
> different parameters, e.g. enlarged font-sizes for disabled (see 
> efa_fontsize.js).
> 
> and:
> fixed pictures destroy every elastic layout.
> 
> since pictures have not only illustrating character, but are also an 
> independent information, it's needed to treat them like every other 
> element too to let them shrink according to the rest of the layout, i.e. 
> text, headers etc. (which works flawlessly on every modern browser - 
> tested!).
> 
> which means: your uploaded pictures need to have a maximal width of 
> let's say 2000px for a maximal viewport and then you let them shrink 
> with CSS according to the respective parent element.
> 
> 
>> Taking that into account you can use the
>> appropriate class at rendering. I've learned that no editor will think
>> about classes because an Text-PIC element rendered for Home might differ
>> from the news section.
> 
> disagree. some clients are very picky exactely in that manner and want 
> the width of pictures exactely as they are planned.
> as a webworker it's just hell not to have the possibility of assigning 
> CSS-classes to those elements in typo3.
> 
>> If you have to offer the ability for the editor to adjust the images to
>> the required sizes or crop the images perfectly check for fdfx_be_image
> 
> of course i have looked up your EXT hoping to find here the solution :-)
> 
> 
> stephan
> 

Sorry but who claimed that images should be rendered with fixed width?
If you do rendering right with Typoscript you get what you want. It's 
just a matter of Design and Typoscripting ;-)

try: <img src="bla" width="xxpx" height="yypx" class="this will come 
from your typoscript" />

get the class rendered depending on the design requirements. If you want 
you can add the id of the element and further the number of the image or 
image name or what ever. It's up to you and your understanding of 
Typoscript.

So an class could look like 'class="newsimage top id203 im1"'
Any problem to address that in css?

By the way I prefer .em more than % ;-)

Regs. Peter.


-- 
Fiat lux!
Docendo discimus.
_____________________________
4Many® Services
XING: http://www.xing.com/go/invuid/Peter_Russ




More information about the TYPO3-dev mailing list