How to make a list of images line up horizontally, in other words – How to make an Image Line-Up.
You don’t have to be a CSI fan.
Turn an ordinary bulleted list into an image line up. Great for social bookmarking applets at the end of posts and in sidebars.
1. Make or obtain some images you want to line up in a row
You can get code for social bookmarking icons from various sites, let your Google search do the work for you.
Get something that looks good on your site or make some images for yourself. I’m thinking about small camellion eye balls for Thesis Theme HQ! [I'll get round to it one day].
2. Create a list of links, with some words to introduce them
Use a text editor like WordPad.
- Wait for the final code from Step 3 onwards
This is just an example of what your code might look like before you style it.
<p>You will love these image links</p> <ul><li><a href="url"><img src="url where image lives" title="name of link" alt="brief word description"></a></li> <li> <a href="url"><img src="url where image lives" title="name of link" alt="brief word description"></a></li> <li> <a href="url"><img src="url where image lives" title="name of link" alt="brief word description"></a></li> <li> <a href="url"><img src="url where image lives" title="name of link" alt="brief word description"></a></li> </ul>
Unless you use the HTML and CSS in this tutorial – that is by adding classes – a list of links will look like this…

You can make your images line up horizontally using classes and some CSS, so they look like…

3. Grab your HTML styled code
Copy and paste this HTML code to modify for your own purpose. Notice that is has classes.
Code for lining up four images in a row
HTML with class attributes – I recommend you copy and paste this code to modify your own urls and descriptions.
<p class="introwords">WORDS YOU WANT BEFORE THE IMAGES</p><ul> <li class="minipiclineup"><a href="http://thesisthemehq.com/wp-content/themes/thesis/images/ChamEye.gif"> <img src="http://thesisthemehq.com/wp-content/themes/thesis/images/ChamEye.gif" title="NAME" alt="WORDS"></a></li> <li class="minipiclineup"><a href="http://thesisthemehq.com/wp-content/themes/thesis/images/ChamEye.gif"> <img src="http://thesisthemehq.com/wp-content/themes/thesis/images/ChamEye.gif" title="NAME" alt="WORDS"></a></li> <li class="minipiclineup"><a href="http://thesisthemehq.com/wp-content/themes/thesis/images/ChamEye.gif"> <img src="http://thesisthemehq.com/wp-content/themes/thesis/images/ChamEye.gif" title="NAME" alt="WORDS"></a></li> <li class="minipiclineup"><a href="http://thesisthemehq.com/wp-content/themes/thesis/images/ChamEye.gif"> <img src="http://thesisthemehq.com/wp-content/themes/thesis/images/ChamEye.gif" title="NAME" alt="WORDS"></a></li>
4. Install and activate Thesis OpenHook
Thesis OpenHook is a fantastic plugin that allows you to control the hooks in the Thesis Theme without knowing php and what hooks are where.
- If you are not a coder – you need this. It will save you so much pain and frustration.
5. Copy and paste the HTML where you want it to appear
For example “After Post” in Thesis OpenHook means at the bottom of posts, before comments.
Thesis OpenHook "After Content" area
6. Grab your code for some CSS styling
Copy and paste this CSS code to modify for your own purpose.
/*line up images instead of bullet list by default*/
.custom .minipiclineup {list-style: none; float: left; }
.custom p.introwords {font-size: 1.5em; margin-bottom: .5em; }
After the HTML and CSS
I went ahead with my camelion eye balls, that I use as a favicon and bullet.

You can see from my example above that I used images with no white space around them.
If you want an effect like the billiard balls above, make sure your images have the required amount of white space around them.
- Of course, if your background is not white, you will want to add space around it that is the same colour of your site.
BONUS TUTORIAL
Add a right aligned image on the same line as your image line-up
Look at the image below – I have highlighted the areas where the words and images were inserted on the page.

If you want another image on the same line but spaced (aligned) to the right, you will need to add two extra lines of code into the relevant boxes in Thesis OpenHook.
You can add the following lines of code directly below the HTML and CSS code lines provided above or you can use the code by itself to add an image to the right of another area.
Add the html
<li class="totheright"><img src="http://thesisthemehq.com/wp-content/themes/thesis/images/ChamEye.gif" alt="WORDS"></li></ul>
Add the CSS
.custom .totheright {list-style: none; float: right; margin-top: -2.5em;}
Thanks for the inspiration
Thanks goes to Thesis Hacker for the inspiration for this article.
Interested in how I taught myself this?
I thought I would share with you how I learnt to do this and many other coding hack tips and tricks in my article Confessions of a Self Taught WordPress Hacker.





{ 14 comments… read them below or add one }
Thanks for the plug bro! I hope i can help and inspire people with my site. It’s a work in progress but It’s constantly changing and evolving.
You like those billiard balls? I made ‘em
Thanks again…
Nasty
nasty’s latest artistic creation..Add a drop cap to your post or page
Thank you so much for this tutorial! It worked wonderfully!
is there a way to space the images just a little bit
Yes, add spaces. You will hardly see them but count the number of taps on your space bar – maybe 10, or 20, even 30 to give spaces between. You will need to click on the left hand side image and use the arrow key to jump to the right in between images to start clicking, then insert another image. Alternatively, you can add spaces in the html.
Hey…. i want to ask..? how to make social bookmarking icons like yours…….. I also use the thesis theme…
.-= deeyah´s last blog ..Toshiba Satellite T130-12G Notebook Review =-.
Grab yourself the sexy bookmarks plugin and customize it with a few clicks.
Good tutorial, I will include this in the next “web design” class…
keep up the good work!
hey Somone
I used the code but the images do not align in one line, but vertically. How to change it?
thank you
in the image box add the style …type the word… Alignstack – no spaces. This will run your images in a line. you can add spaces to space them, make sure they are left aligned.
I am designing my wordpress thesis theme but I have problem. When I use to open home page than everything goes OK but when I open any one article than same thumbnail image become very large. I did not find any setting on my wordpress thesis theme 1.8…Is that due to coding or what if you know the answer please reply me……I have problem like this : sumana.com.np/top-android-applications-for-android-smartphone/
When adding images you should always resize to make them smaller, e.g. KBs are always better than MBs and avoid GB images. I use IrfanView, a free program that will resize to about 64KB. If your images are too large, you will use too much CPU on yoursharedweb hosting and may have your account suspended. You may want to limit the without your images to 500px for example. Go to your Wordpress dashboard under general settings and adjust the maximum upload image size to 500px or whatever you choose..you can always upload actual size for special occasions.
When adding an image to a post in the text area, choose the width when you upload. If adding a featured image or thumbnail or post image in the fields below the text editor in your Thesis dashboard, you may have to make sure that the image is the size that you want … Sometimes different browsers don’t recognize the image settings in Thesis design options. Choose the size of thumbnails for teasers and post images in Thesis design options.
Hi there,
I tried the above HTML and CSS combination, but my images still appear like the vertical list of images in the example above. Not quite sure what I’ve done wrong but obviously something. I haven’t got Thesis open hooks installed as I have just put the html below my text in the HTML image editor – could this be the problem? I assumed that this was just to help you position stuff.
I just wrote a simply tutorial on how to add images in a row…
http://thesisthemehq.com/quick-tip-how-to-insert-images-side-by-side-in-wordpress/
Thanks for a tons of useful information!
You are the best Somone!
Regards,
Zadania