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

grac at gmx.ch grac at gmx.ch
Wed Nov 19 16:51:43 CET 2008


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





More information about the TYPO3-dev mailing list