Recent Topics

1 Mar 23, 2006 12:05    

hi,

how can i change the img insert code to width=450px.
ok, ich can do it manually when i add the img code to my post.
i can handle this, when my picture is bigger than 450px - but i think my bloggers won't do that and so my div frame explode....

do you know what i mean ? sorry, my englisch is not so good, i'm german.

ok,
when i upload a picture, then i go to the filemanager and select the picture i wanted to show in my post.
then i klick the "img" button and the the code is in my post like this

<div class="image_block"><img src="http://www.xy.de/media/blogs/xy/IMG_4568_sw.jpg" alt="" title="" width="600" height="400"/></div>

but the width is to big and i want resize all pictures there are bigger than 450px to width=450px autimatically.

is this possible ?

2 Mar 24, 2006 18:53

Two thoughts:

1) You should resize your pictures BEFORE you upload them. Reason ... if you resize to 450px (and they are larger) ... the visitor still has to LOAD a "larger-than-450px" image, but only gets to SEE a "450px" image.

Make sense?

2) IF you still want to load larger-than-450px images and display them as 450px images, you could make a class name to do it. In the POST, you would have this

 <img class="w450" src="http://yoursite.com/image.jpg" alt="altText" title="titleText" />

THEN in the CSS file, you would have this

 img.w450 { width:450px; }

(Don't specify height, as it will be different, for each image. Just specify the width, in the CSS. Any images larger than 450px will be resized to 450px automatically).

Hope this helps. :D


Form is loading...