More pictures in one row - or side by side pics

November 25, 2008

By default, when you upload pictures (images, or videos)) into your Blogger Posts, they are placed one after another. In one column.


The only thing we can choose, is to align them (left-center-right). There's no option to organize them so they can be next to each other, in one row (horizontal).
The best way to do this, is using the TABLES (if you want to know more about HTML Tables, visit www.w3schools.com).

1. You have to find out what is the WIDTH of your post area. To calculate how many pics can fit there. In Blogger, go to LAYOUT --> EDIT HTML, and in code section, find the following:
#main-wrapper {
width: 410px;
...so, in my case, it's 410 px. But you can't use all of it. Margins are also included. So, you can use about 390-400px.

2. Calculating. How many pics will fit.
Important thing to know is, when we place pictures in the table, we will make them smaller. But clicking on each, they will open in full size.

3. Upload pictures to:
- free web host service to get the URL address (Photobucket, Picasa, TinyPic...)
- or upload pics directly (through blogger), and get the code from there

4. Let's make a table. I'll make one with 1 Row (horizontal), and 3 Columns (vertical). And place my pics in it.
PLACE THE CODE IN "EDIT HTML" MODE! See the picture:
Here's the code for it:
<table border="0">
<tr>
<td><a href="PIC 1 URL" target="_blank" title="View">
<img height=200 width=120 src="PIC 1 URL" alt="pic name"/></a></td>
<td><a href="PIC 2 URL" target="_blank" title="View">
<img height=200 width=120 src="PIC 2 URL" alt="pic name"/></a></td>
<td><a href="PIC 3 URL" target="_blank" title="View">
<img height=200 width=120 src="PIC 3 URL" alt="pic name"/></a></td>
</tr>
</table>
....REPLACE the lines in orange, with your pics URL (from a free web host).
....in blue, change number 0 to 1,2,3,4.....if you want a border around the table
....adjust width accordingly to width of post area (120 + 120 + 120 = 360 px, it fits into 410 px)
....change the green text to whatever (you can see this when placing your mouse cursor on the pic)
....in purple, give your picture a name (for search engines)
....and here's the result:

...when you click on your pic, you'll see the full size of it...

PROBLEMS:
► if you haven't deactivated it, the default blogger border will still appear around the pic (look at the arrow in the picture above) . If you want to remove it from certain pics, add some style (in orange) to the the existing line (in white):
<td><a href="PIC 2 URL" target="_blank" title="View">
<img height=200 width=120 src="PIC 2 URL" alt="pic name" style="border:none;"/></a></td>
...use the same rule for every picture...

► notice a lot of empty space between Title and Table. This happens because Blogger adds a <br /> tag for each time you press the Enter key to start a new line. To reduce it, add the following code ABOVE the table:
<style type="text/css">.nobrtable br { display: none }</style>
<div class="nobrtable">
...and this one UNDER the table:
</div>
So, these are the basics. It ain't so complicated, and there's a million options. You can use Tables for:
  • inserting pictures (make more rows, columns....)
  • placing text, making bullet lists
  • placing videos side by side
  • really, whatever you can think of....
Options:

-- add some headings to the pictures, make another row, and place it above (or under) the pictures. For my example, like this:
<table border="0">
<tr>
<th align="center">Name 1</th>
<th align="center">Name 2</th>
<th align="center">Name 3</th>
</tr>
<tr>
<td><a href="http://i34.tinypic.com/95pfk6.jpg" target="_blank" title="View">
<img src="http://i34.tinypic.com/95pfk6.jpg" alt="pic name" width="120" height="200" /></a></td>
<td><a href="http://i37.tinypic.com/nq5yfp.jpg" target="_blank" title="View">
<img src="http://i37.tinypic.com/nq5yfp.jpg" alt="pic name" width="120" height="200" /></a></td>
<td><a href="http://i36.tinypic.com/iwuf85.jpg" target="_blank" title="View">
<img src="http://i36.tinypic.com/iwuf85.jpg" alt="pic name" width="120" height="200" /></a></td>
</tr>
</table>
...added row is in orange
...you can change the alignment into right, left (in green)

...if you'd like to change font color, size, family, add this code:
<font size="6" face="arial" color="#000000"></font>
...change the styles to whatever suits you...

-- leave an empty cell by not placing nothing between:
<td></td>
-- fill the cell with text, instead of picture:
<td>Some text goes here...</td>
-- color the cell with some color:
<td bgcolor="#000000">Some text here...</td>
-- add some space (padding) from borders:
<table border="0" cellpadding="10">
-- create bullet list in the cell:
<td>Title of the list
<ul>
<li>something</li>
<li>something else</li>
<li>nothing</li>
</ul>
</td>

That's about it....Learn more visiting www.w3schools.com.

CONCLUSION:
This can look like a big deal, but really, it's not. When you do it once, you're ready. Save the code somewhere (Notepad, ....), just copy it, and paste when composing post.
You can also create tables using any HTML editor (like Dreamweaver, for example). Just copy the code from it....
There's also a way of doing this through Windows Live Writer, if you're using it.

If you'll need help, ask....

Smile!

post signature
Face It! Tell Your Tweets Digg It! Add to Delicious Stumble Upon I Reddit! Mixx it Up! Add to Your Faves

32 comments:

goooooood girl said...

i like your blog......

pocket said...

Thanks, gooood girl.....

Anonymous said...

really nice template !

I'm looking for RADIO template ... where I can put may mp3 player in a nice template typ RADIO

Maybe the next one ?

Thanks a lot

tsygim@yahoo.com

pocket said...

That's a deal.
Smile!

Sunshinemom said...

Thank you so much!

blah said...

You are a legend - thank you:-)

Gonçalo Saraiva said...

Hi! I made a table on my blog but it appears in the bottom of the post. Leaving a big space between the Start of post and the begginig of table.

Can you help me please?
http://originalbandalheira.blogspot.com/search/label/Agenda

pocket said...

Hey Gonçalo Saraiva...Read the article carefully. Under Problems, there's a piece of code you have to place to get rid of blank space...Ok?

*Love* said...

hey
http://orkutmad.blogspot.com/
i use this....and also add the code to remove the spacing between the title and my post...but my labels ( categories ) got placed at the bottom ..please help me soon and tell me the solution why it is so...

pocket said...

Hey..
Your table is too wide. The post area of this template is 425px wide. Table width is around 450px..
You'll have to reduce the width of your table columns...10px for each...
Smile!

*Love* said...

where is the width of table column option which i need to change...can you please explain in brief that how can i solve this problem

pocket said...

Hey *Love*...
If you use pictures in tables, you can define the column width with the picture width...

And if you need to create a custom width columns, use percentages, like so:
<table>
<tr>
<td width="80%">Some text...</td>
<td width="20%">Some more...</td>
</tr>
</table>

Smile!

*Love* said...

hey i want to add the pictures in the tables..for that i use the code to place pictures in the center and heading at its top


The code was working perfectly but there was lots of space between title and my post then i added another code (which was given by you to remove the space) on the top of the table code..then there was no space left but the another problem comes out is that the link of my categories got placed at the bottom...now you tell me what should be the correct code for me...

pocket said...

2 things could have caused this:
► your table width is exceeding your Post section (solution - decrease the table width, or pictures width)
► mistake in HTML code (of table or formatted text)..usually, some tags are not closed.

Now, I can't see your code, or post, to tell you exactly what to do, but you can do this yourself..Right?

*Love* said...

here is my table code...check it out
http://img149.imageshack.us/img149/1036/codehy4.jpg

and now tell me the problem

pocket said...

Change this line:
<table border="">

..into this:
<table>

And, your closing div is in the wrong place...Find:
</div>

..and place it UNDER:
</table>

*Love* said...

hey i have tried again and i use this code
http://img49.imageshack.us/img49/5269/56416185oq6.jpg

still not working

pocket said...

You didn't do what I told you to. Place the div UNDER the table, like so:
</table>
</div>

..table code has no mistakes. If your sidebar is still down, there's something else that you have to fix. It's a common problem. Check the Google's Blogger Help Group.

*Love* said...

Hey now its working.......
Thanks...!!

Anonymous said...

HI, WHAT IF MY IMAGES ARE FROM MY COMPUTER FILE? HOW CAN I EDIT THE CODE?

pocket said...

Anonymous,

Upload the pics from your computer. Click on EDIT HTML tab (beside COMPOSE). Locate the code of the picture. It should look something like this:

<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_myLYaXLNh7Y/SZavjzrcjpI/AAAAAAlI/8ICfLi0lfGI/s1600-h/calendario.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 100px; height: 215px;" src="http://4.bp.blogspot.com/_myLYNh7Y/SZavjzrcjpI/AAAAAAAAAlI/8ICfLi0lfGI/s400/calendario.jpg" alt="" id="BLOGGER_PHOTO_ID_5302618648054802" border="0" /></a>

..CUT this code, and paste it in the column instead of this part:

<a href="PIC 1 URL" target="_blank" title="View">
<img height=200 width=120 src="PIC 1 URL" alt="pic name"/></a>

...so, all together, the column should look like this:

<td><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_myLYaXLNh7Y/SZavjzrcjpI/AAAAAAAlI/8ICfLi0lfGI/s1600-h/calendario.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 100px; height: 215px;" src="http://4.bp.blogspot.com/_myLYaNh7Y/SZavjzrcjpI/AAAAAAAAAlI/8ICfLi0lfGI/s400/calendario.jpg" alt="" id="BLOGGER_PHOTO_ID_5302618648054802" border="0" /></a></td>

..do the same for other pics...

Meisie said...

Thank you so much for giving me someplace to start making changes! As soon as I have the time I'll be trying out many of your great tips.
Many thanks for helping this clueless gal!
LOL

Anonymous said...

Hi,
I hav a same prob as Anonymous.I try to copy and paste the code and replace PIC 1 URL and Pic Name with my pic's name...but then when i try to preview the result, its show nothing.is there anywhere i replace it with wrong statment?

Kit Golson said...

HI this looks wonderful, I will try it...but I have a dumb question...do you put the table in the html before you upload the pictures? if so, how do you get the three pictures to go to the right place when you upload them? Thanks! Kit www.chicprovence.blogspot.com

Holly said...

Your blog is seriously the best. I always look on the net to find different ways to update my blog or add new things. I have been blogging for 2 years and just came across this site today! I have learned so much from you. Thanks for sharing, you rock!

honeybunch said...

Hi - I was excited to try this, but after two attempts at replacing the image HTML (using photobucket) the images are there, nicely aligned, but with red Xs. What am I doing wrong?

smantika said...

I have been looking for this tutorial...now I found it... Thanks..........

J said...

OMG THANK YOU SO MUCH!! Been looking everywhere for an easy tutorial on how to align my pics!

Ryena said...

You know what... Your Blog really help me a lot to customize my blog layout and content^-^

THANK YOU VERY MUCH!! YOUR SITE IS THE BEST OF ALL.. SIMPLE BUT YET VERY EFFECTIVE.

B. said...

Love this blog! You've got me up and running with my own. Can you in the future do this sort of blog but dealing with putting mp3 on the horizontal axis? I'm using www.fairtilizer.com as my player and want to line the songs up horizontally. Thanks!

Shivam Sharma said...

Good stuff man.. thanks!

mbt shoes said...

Do you like MBT shoes online MBT chapa buy it MBT chapa shoes with MBT lami free MBT lami shoes shipping MBT kaya over MBT kaya shoes us,we MBT M.Walk sell MBT m walk shoes on line mbt men shoes for mbt women shoes and vibram five fingers sale vibram five fingers sale is our discount vibram five fingers best cheap vibram five fingers choice cheap MBT chapa shoes thank cheap MBT lami to cheap MBT lami shoes see cheap MBT kaya it cheap MBT kaya shoes you can cheap MBT M.Walk go cheap MBT m walk shoes by cheap mbt men shoes click cheap mbt women shoes

Say it...

Related Posts with Thumbnails