HTML Help - Sizing Vertical Pictures

Get HTML help, style input, and feedback on your pages from other SP members.
User Avatar
MarkDidier

 
Posts: 380
Joined: Tue Jul 01, 2008 2:24 am
Thanked: 67 times in 48 posts

HTML Help - Sizing Vertical Pictures

by MarkDidier » Fri Aug 21, 2009 8:30 pm

Looking for HTML code to reduce/adjust the size of vertical pictures - primarily for TR purposes.

I have always used - aligncenter:medium. I like the center formatting which works great for horizontal pictures but the vertical pictures end up being too large for the screen and I'd like to shrink them down a bit.

Sorry if this is a repeat. I looked thru a bunch of the old HTML help threads and couldn't find the answer.

Thanks,
Mark (IT challenged)

User Avatar
nattfodd

 
Posts: 208
Joined: Fri Aug 22, 2008 1:11 am
Thanked: 10 times in 5 posts

by nattfodd » Sat Aug 22, 2009 8:32 am

There is not really HTML code for automatically reducing image sizes (you can kind of do it in CSS, but the result is often very ugly, and it won't work in here anyway). When you upload an image to the site, it generates a few different sizes for you to use, just add e.g. :small: at the end of your image insertion code (before the ending "]" ). If that doesn't work for you and you want different sizes, then you'll have to resize yourself, with programs like photoshop or the gimp (this one is free) and then upload the new image.

I hope that makes sense.

User Avatar
Gabriele Roth

 
Posts: 1376
Joined: Tue Dec 09, 2003 11:09 am
Thanked: 24 times in 17 posts

by Gabriele Roth » Sat Aug 22, 2009 9:08 am

an example ...
Code: Select all
<a href="http://www.summitpost.org/view_object.php?object_id=330277"><img src=http://www.summitpost.org/images/original/330277.jpg height=250>

User Avatar
nattfodd

 
Posts: 208
Joined: Fri Aug 22, 2008 1:11 am
Thanked: 10 times in 5 posts

by nattfodd » Sat Aug 22, 2009 9:46 am

My bad, you can indeed do it by adding the style information to your HTML code. But I would advise you to avoid it if you care at all how good the images will look. Web browsers have a tendency to oversharpen and use crappy algorithms for downsizing.

User Avatar
MarkDidier

 
Posts: 380
Joined: Tue Jul 01, 2008 2:24 am
Thanked: 67 times in 48 posts

by MarkDidier » Sat Aug 22, 2009 12:55 pm

Thanks for the help - much appreciated. I'll give it a whirl and see how it works out.

User Avatar
nartreb

 
Posts: 2203
Joined: Sat Apr 03, 2004 10:45 pm
Thanked: 175 times in 147 posts

by nartreb » Sat Aug 22, 2009 4:00 pm

Aside from the fact that browsers tend to make the images look bad (jagged), are you aware that SP produces several sizes for you? Display the version closest to the size you want, NOT, as in Gabriele's example, the original-size version, which tends to be way bigger than you want. Starting with the original and shrinking it in the browser is a waste of bandwidth and will make your TR display slowly.
So start by trying the medium size; if that's too big, try the small size. If what you want is in between, use the medium size and shrink it with the HEIGHT attribute in HTML. (Browsers are better at shrinking than expanding - it's easier to interpolate than to extrapolate.)
In other words:
Code: Select all
<a href="http://www.summitpost.org/view_object.php?object_id=330277">
   <img src=http://www.summitpost.org/images/medium/330277.jpg height=250px>
</a>

(Gabriele also forgot to close his A tag...)

User Avatar
MarkDidier

 
Posts: 380
Joined: Tue Jul 01, 2008 2:24 am
Thanked: 67 times in 48 posts

by MarkDidier » Wed Dec 16, 2009 12:03 am

nartreb wrote:
Code: Select all
<a href="http://www.summitpost.org/view_object.php?object_id=330277">
   <img src=http://www.summitpost.org/images/medium/330277.jpg height=250px>
</a>



Thanks a bunch. I finally got around to getting this to work and am able to resize.

This code appears to left justify the picture - how would I center it?

Thanks,
Mark


Return to Page Help

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests