Centre Image

images php coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
DWillett
New php-forum User
New php-forum User
Posts: 22
Joined: Fri May 25, 2012 12:19 am

Thu Jun 21, 2012 10:30 am

Hi
Is it possible to centre the output image from this code?
The target is inner, can the code be edited to do this?

Regards

Code: Select all

//display images

foreach ($imgs as $img) {
    echo "<a href=\"$img\" target=\"inner\"><img src='$img' width=\"80\" border=\"1\"/></a> ";


}

User avatar
egami
php-forum GURU
php-forum GURU
Posts: 2192
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Thu Jun 21, 2012 11:59 am

<div style="text-align:center;"><a href="myimage.jpg"><img src="myimage.jpg" /></a></div>

DWillett
New php-forum User
New php-forum User
Posts: 22
Joined: Fri May 25, 2012 12:19 am

Wed Jun 27, 2012 5:44 am

Hi Guys

I don't think this is what I was after and difficult to explain. Here's a link to the web I'm working on where I can probably explain better:

http://www.mic-console.com/Image_Client/index.php

Use 200532 in the reference box.
Once in there you see links to pdf files in the left frame, that part works great.
If you click an image thumbnail the selected image shows frame section of the browser to the right, this is the part I wanted to improve. It would be great if the image opened in the right hand side but expanded to fill the section or at very least opened centralised.
Or is there another way to do this? I just want it to look better than it does now.

I hope someone can help?

Regards

johnj
php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Sun Jul 01, 2012 8:30 pm

In the right frame, you have placed the image within a <p> tag. Either you can change the alignment using the style (<p style="">) or follow what egami has advised - that should also work.

DWillett
New php-forum User
New php-forum User
Posts: 22
Joined: Fri May 25, 2012 12:19 am

Mon Jul 02, 2012 2:33 am

Hi

Thanks for all the help guy's.
Every day is a learning curve for me.
I managed to achieve along the lines of how I wanted the page to look by using some other code.

( you get kinda hooked on this stuff - lol )

Thanks again guys.

Regards

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests