[TYPO3-ttnews] Is is possible to not set size on images

Stefan Beylen typo3 at we-make.net
Wed Apr 23 10:15:39 CEST 2008


Redvald Hjulstad wrote:
> Have a design where everything is based on %. Is it possible to not set 
> the px size on images in tt_news, so I can scale them in css instead?

a) You'll have to modify this class
includeLibs.tx_cssstyledcontent_pi1 = 
EXT:css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php
which does the actual image calculations and px output.

b) probably it would be easiest to postprocess the images with 
preg_replace and add some styles 4ex:

<img src="" ... width="105" height="220"... />

to

<img src="" ... width="105" height="220" 
style="width:10.5%;height:22.0%;"... />

for case b) also see second part in the podcast [1] here to understand 
what I am talking about in the above example ;)
It wont be that easy though as not just images get px attributes set in 
the output

if you are interested contact me via email and we can work together, 
shouldn't be too hard... I'll not be able to do much this week though

[1] http://castor.t3o.punkt.de/files/podkast_7mf_css.m4v


More information about the TYPO3-project-tt-news mailing list