BMEWS
 
Death once had a near-Sarah Palin experience.

calendar   Thursday - February 26, 2009

A Learning Post For Peiper

Peiper - go into the editor and read the code.



imageimage



Ok, we’ve got 2 images, each of which is wider than half the screen width. So instead of being side by side they get stacked on top of each other. Not what you want in this case. But notice that the Center command stacks them up neatly, even though they are on 2 lines. So let’s try adjusting their sizes by doing a bit of math and scaling them down a bit.


imageimageimage

I cut the height and width in half, so each image is now 1/4 of its original size. This should fit with room to spare on even the lowest resolution monitor. I enlarged the width value of the spacer image to 10 to put a little gap between them. I used the Center statement so that they come out in the middle of the frame.



imageimageimage
This time each image has had the width scaled using percentages instead of absolute pixels. Since I didn’t scale the heights, they will look mashed up or stretched out. The spacer has also been stretched. No here’s a funny thing: on my monitor these images are not shown side by side. They come out on top of each other, even though the total width percentages are less than 100% !!


You can put them in tables too. [I made the borders large so you can see them. If you make them invisible then you’re just using the table as a convenient device for lining things up. Unfortunately tables don’t always work right. I don’t know why, but I think it’s a shortcoming of the blog engine interacting with the various browsers.] If you set the width of the table cell to be a percentage, then you can manipulate the location and size of the images within each cell, but that manipulation will only be relative to the cell itself ...

ANOTHER FUNNY THING: on my PC, which has a 1280x1024 resolution, when I use Internet Explorer 7 NONE of these tables come out right. Yet all of them work with Firefox. Go figure. So I went and upgraded to IE 8, and now they display fine. But the editor now works strangely. Ack, you just can’t win sometimes.






image
image

This table has no width specified, so it defaults to 100% of the available width. The exact same table with a specified width (50% in the following example) will show up much smaller. Will it be centered or left justified by default? Let’s see ...







image
image

Ah ha!! It is left justifed. So when using a table that is narrower than the whole available width, you would apply the Center command to the entire table if you want it in the middle of the screen:

Ok, now you know how it’s done. Notice also that the line spacing seems to be rather huge around tables. Take a look at the main .css files and see if the TABLE command has been tweaked to force a bit more vertical spacing. With a table, the images will ALWAYS come out side by side.

Let’s try one more thing, shall we? Notice the code and spot the important difference:






image image

The table border, cellspacing, and cellpadding have all been set to zero. That is not important, it just forces the table to take up the least possible amount of screen space. These values may also be overridden by the blogging engine or the browser, both of which may have default or minimal values for them.

The important thing is that the images have NO height or width settings, so they default to full size. On my monitor they come out side by side, even though the two images together are actually wider than the frame! This is what is called a side effect, and is something you want to avoid. It is the result of the “battle” between the rules that pertain to the IMG, TABLE, and TD statements and the rules that pertain to the width of the posting area [which is not actually a FRAME, but you can think of it as if it were]. funky!

Bottom line: The easiest way to make sure the images come out side by side is to size them down to under 300 pixels wide when you upload them. If you make that “thumbnail” a copy of the original image, you can then figure out how to make each image a hyperlink back to the original full size image if that is important. Tables are great, but they can be a real pain sometimes.


avatar

Posted by Drew458   United States  on 02/26/2009 at 02:22 PM   
Filed Under: • Blog Stuff •  
Comments (3) Trackbacks(0)  Permalink •  
Page 1 of 1 pages

Five Most Recent Trackbacks:

Once Again, The One And Only Post
(4 total trackbacks)
Tracked at iHaan.org
The advantage to having a guide with you is thɑt an expert will haѵe very first hand experience dealing and navigating the river with гegional wildlife. Tһomas, there are great…
On: 07/28/23 10:37

The Brownshirts: Partie Deux; These aare the Muscle We've Been Waiting For
(3 total trackbacks)
Tracked at head to the Momarms site
The Brownshirts: Partie Deux; These aare the Muscle We’ve Been Waiting For
On: 03/14/23 11:20

Vietnam Homecoming
(1 total trackbacks)
Tracked at 广告专题配音 专业从事中文配音跟外文配音制造,北京名传天下配音公司
  专业从事中文配音和外文配音制作,北京名传天下配音公司   北京名传天下专业配音公司成破于2006年12月,是专业从事中 中文配音 文配音跟外文配音的音频制造公司,幻想飞腾配音网领 配音制作 有海内外优良专业配音职员已达500多位,可供给一流的外语配音,长年服务于国内中心级各大媒体、各省市电台电视台,能满意不同客户的各种需要。电话:010-83265555   北京名传天下专业配音公司…
On: 03/20/21 07:00

meaningless marching orders for a thousand travellers ... strife ahead ..
(1 total trackbacks)
Tracked at Casual Blog
[...] RTS. IF ANYTHING ON THIS WEBSITE IS CONSTRUED AS BEING CONTRARY TO THE LAWS APPL [...]
On: 07/17/17 04:28

a small explanation
(1 total trackbacks)
Tracked at yerba mate gourd
Find here top quality how to prepare yerba mate without a gourd that's available in addition at the best price. Get it now!
On: 07/09/17 03:07



DISCLAIMER
Allanspacer

THE SERVICES AND MATERIALS ON THIS WEBSITE ARE PROVIDED "AS IS" AND THE HOSTS OF THIS SITE EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, TO THE EXTENT PERMITTED BY LAW INCLUDING BUT NOT LIMITED TO WARRANTIES OF SATISFACTORY QUALITY, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE SERVICE OR ANY MATERIALS.

Not that very many people ever read this far down, but this blog was the creation of Allan Kelly and his friend Vilmar. Vilmar moved on to his own blog some time ago, and Allan ran this place alone until his sudden and unexpected death partway through 2006. We all miss him. A lot. Even though he is gone this site will always still be more than a little bit his. We who are left to carry on the BMEWS tradition owe him a great debt of gratitude, and we hope to be able to pay that back by following his last advice to us all:
  1. Keep a firm grasp of Right and Wrong
  2. Stay involved with government on every level and don't let those bastards get away with a thing
  3. Use every legal means to defend yourself in the event of real internal trouble, and, most importantly:
  4. Keep talking to each other, whether here or elsewhere
It's been a long strange trip without you Skipper, but thanks for pointing us in the right direction and giving us a swift kick in the behind to get us going. Keep lookin' down on us, will ya? Thanks.

THE INFORMATION AND OTHER CONTENTS OF THIS WEBSITE ARE DESIGNED TO COMPLY WITH THE LAWS OF THE UNITED STATES OF AMERICA. THIS WEBSITE SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE UNITED STATES OF AMERICA AND ALL PARTIES IRREVOCABLY SUBMIT TO THE JURISDICTION OF THE AMERICAN COURTS. IF ANYTHING ON THIS WEBSITE IS CONSTRUED AS BEING CONTRARY TO THE LAWS APPLICABLE IN ANY OTHER COUNTRY, THEN THIS WEBSITE IS NOT INTENDED TO BE ACCESSED BY PERSONS FROM THAT COUNTRY AND ANY PERSONS WHO ARE SUBJECT TO SUCH LAWS SHALL NOT BE ENTITLED TO USE OUR SERVICES UNLESS THEY CAN SATISFY US THAT SUCH USE WOULD BE LAWFUL.


Copyright © 2004-2015 Domain Owner



GNU Terry Pratchett


Oh, and here's some kind of visitor flag counter thingy. Hey, all the cool blogs have one, so I should too. The Visitors Online thingy up at the top doesn't count anything, but it looks neat. It had better, since I paid actual money for it.
free counters