1 kding Jun 26, 2004 23:02
3 kding Jun 27, 2004 18:53
thank you. I have tried your way(CSS way). It, again, worked in backoffice, I mean preview. then once I posted the image, and go back to blog, the image stretched to its full size. any thoughts. why backoffice works? i use custom skin (modified). so it has two columns.
thank you again.
4 isaac Jun 27, 2004 22:30
Do you have an example online that I can see? I just went to your blog, and it looks like all the images are properly sized, including the images on [url=http://www.jia-ye.net/kele/index.php?title=life_in_china_a_slide_show&more=1&c=1&tb=1&pb=1]this post[/url], which are being shrunk from their regular size.
If the pictures in that post are still showing up as too big, try clearing out your cache or temporary internet files, and then refresh the page.
5 kding Jun 28, 2004 00:54
isaac, thank you. i appreciate your help. Yes, those images are sized manually. I added width="560" into <img> when post news. If not, it will be too wide. See the sample at
http://www.jia-ye.net/kele/index.php?title=life_in_china_a_slide_show&more=1&c=1&tb=1&pb=1
Thank you!
6 isaac Jun 28, 2004 06:00
Ah, I see... seems that it takes it fine in Mozilla, but IE is behind the times.
Anyone up for a little DOM scripting?
7 kding Jul 10, 2004 09:55
check this thread. it works to me.
Any reason in particular why you're doing this in javascript, rather than CSS?
The CSS way:
Allow people to upload whatever size image they want.
Add this to the CSS file that you use for that skin:
A cleaner way to do this with the DOM, if that's really how you want to do it, would be to add a function in the head segment to get the elements by type, and set the width. That way, there's no clutter in the XHTML, so it's much more readable and degrades better.
EDIT:
Oh, right, you want to be able to click on them to get the full image. Well, the javascript that you're adding to the IMG tags isn't going to do that, so there must have been some sort of function in the head to add an onClick event. Sorry that I'm not the DOM guru 'round these parts, or I'd give you more help.