Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
image alignment
07-03-2012, 08:46 AM
Post: #1
image alignment
Is there a methodology (similar to startrow - endrow) that one could use to display uploaded images horizontally? I'm referring to the following bit of code...
PHP Code:
            foreach ($vehicle["photos"] as $pid)
            {
                
$i += 1;
                
$contentopts["fields"][] = array(
                    
"title" => "Photo #" $i,
                    
"type" => "custom",
                    
"value" => "<img style=\"margin-left: 7px;\" src=\"photos/" $_REQUEST["id"] . "_" $pid ".jpg\" width=\"200\" />",
                );
                
$contentopts["fields"][] = array(
                    
"type" => "checkbox",
                    
"name" => "delete_" $pid,
                    
"value" => "yes",
                    
"display" => "Delete this photo"
                
);
            } 
Horizontal, as opposed to vertical, alignment would be more visually attractive as there may be upwards of 5 photographs to display

If you don't squeak, you won't get oiled!Cool
Find all posts by this user
Quote this message in a reply
07-06-2012, 10:05 PM
Post: #2
RE: image alignment
Sorry about the delayed reply - wasn't feeling well.

Actually, vertical alignment is the most mobile-friendly solution. You could use a table to display a tiny version of each image in one column and then a link to delete the image instead of a checkbox. Make the image clickable to open a new window and go to the full-size version.

And, of course, the 'custom' field lets you output raw HTML, which means you can do whatever you want to.

Author of Barebones CMS

If you found my reply to be helpful, be sure to donate!
All funding goes toward future product development.
Find all posts by this user
Quote this message in a reply
07-06-2012, 11:52 PM (This post was last modified: 07-06-2012 11:57 PM by JiminSA.)
Post: #3
RE: image alignment
(07-06-2012 10:05 PM)thruska Wrote:  Sorry about the delayed reply - wasn't feeling well.

Actually, vertical alignment is the most mobile-friendly solution. You could use a table to display a tiny version of each image in one column and then a link to delete the image instead of a checkbox. Make the image clickable to open a new window and go to the full-size version.

And, of course, the 'custom' field lets you output raw HTML, which means you can do whatever you want to.

Of course - mobile display, I had forgotten! I'll leave it as is methinks...

If you don't squeak, you won't get oiled!Cool
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

© CubicleSoft