Approve the Cookies
This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and our Privacy Policy.
OK
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Guest
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Register to forums    Log in

 
FORUMS Post Processing, Marketing & Presenting Photos Presentation & Building Galleries 
Thread started 27 Mar 2007 (Tuesday) 03:14
Search threadPrev/next
sponsored links (only for non-logged)

html to set picture centered

 
azpix
Goldmember
Avatar
3,335 posts
Likes: 19
Joined Oct 2006
Location: Chandler, Arizona USA
     
Mar 27, 2007 03:14 |  #1

I have 1 picture link on my main page and it sits center horizontally. How can I also get it to sit centered vertically?

anyone know the html to make it sit at the center rather than the top of the screen.

thanks


Gear- 7d, 24-70L, sigma 70-200, Sigma 120-400, canon 50 1.4, Canon 100 2.0,sigma 10-20 and a DJI Mavic Pro Drone

  
  LOG IN TO REPLY
CrazyPuma
Member
84 posts
Joined Jun 2005
     
Mar 27, 2007 22:16 |  #2

If I understand what you're wanting correctly, there is no simple html command to achieve that.

You can fudge your way around things by either using a lot of BR commands to lower the picture so it doesn't sit directly at the top of a page (for example), or put the image in a table and define where the table will sit (tho I think you'd need CSS coding rather than HTML table coding for better placement control), or use empty, unbordered, size-defined tables to "push" the image or image-in-a-table boxes down from the top, instead of BR's. Or use the invisible.gif/spacer.g​if type of trick. They all achieve the same purpose in the end, just some with more refinement.

And none of this will guarantee that people using different monitor resolutions will see the image as being in the "smack dab center" of their screen - but it will make it so the image isn't flush against the top.


Canon EOS 20D / EF100mm F2.8 USM Macro / +the kit lens that I now feel like throwing away.
Technically challenged, cheap, and lazy ...http://photos.crimsonk​eep.com/ (external link)

  
  LOG IN TO REPLY
Double ­ Negative
*sniffles*
Avatar
10,533 posts
Likes: 11
Joined Mar 2006
Location: New York, USA
     
Mar 28, 2007 00:35 |  #3

There are a few ways to do this - CSS, DHTML and Javascript would be my guesses, offhand.

Plain HTML offers no such tag. Just <CENTER> </CENTER>


La Vida Leica! (external link) LitPixel Galleries (external link) -- 1V-HS, 1D Mark IIn & 5D Mark IV w/BG-E20
15mm f/2.8, 14mm f/2.8L, 24mm f/1.4L II, 35mm f/1.4L, 50mm f/1.2L, 85mm f/1.2L II, 135mm f/2.0L
16-35mm f/2.8L, 24-70mm f/2.8L, 70-200mm f/2.8L IS, 100-400mm f/4.5-5.6L IS, Extender EF 1.4x II & 2x II

  
  LOG IN TO REPLY
rlrouse
Senior Member
884 posts
Likes: 1
Joined Jan 2005
Location: Southwestern Virginia
     
Mar 28, 2007 08:21 as a reply to  @ Double Negative's post |  #4

Try creating a table with one cell and set the vertical alignment of the cell to middle (VALIGN).


www.TodaysPhoto.org (external link)

  
  LOG IN TO REPLY
jrotello
Member
Avatar
104 posts
Likes: 1
Joined Nov 2005
Location: Roscoe, IL
     
Mar 28, 2007 08:36 as a reply to  @ rlrouse's post |  #5

This should do it for you.

 
<table width="100%" height="100%">
<tr>
<td align="center" valign="middle">
<a href="url_goes_here"><img src="path_to_image_her​e" border="0"></a>
</td>
</tr>
</table>

-Jason

flickr (external link)

  
  LOG IN TO REPLY
CrazyPuma
Member
84 posts
Joined Jun 2005
     
Mar 28, 2007 14:36 |  #6

Using the html height attribute to set the height of a table is generally not recommended, as it isn't considered valid code. Which isn't to say that it cannot work - particularly if you don't put that "doc type" line at the top of your scripted pages - but it may be inconsistent. And of course, if you ever decide to put content in that table other than that single image, and thus the content becomes "taller" than a users browser window, it can all go phooley.

Here, maybe this might be helpful, both about 100% height and CSS ways to define height instead.

http://apptools.com/ex​amples/tableheight.php (external link)


Canon EOS 20D / EF100mm F2.8 USM Macro / +the kit lens that I now feel like throwing away.
Technically challenged, cheap, and lazy ...http://photos.crimsonk​eep.com/ (external link)

  
  LOG IN TO REPLY
sponsored links (only for non-logged)

1,354 views & 0 likes for this thread, 5 members have posted to it.
html to set picture centered
FORUMS Post Processing, Marketing & Presenting Photos Presentation & Building Galleries 
AAA
x 1600
y 1600

Jump to forum...   •  Rules   •  Forums   •  New posts   •  RTAT   •  'Best of'   •  Gallery   •  Gear   •  Reviews   •  Member list   •  Polls   •  Image rules   •  Search   •  Password reset   •  Home

Not a member yet?
Register to forums
Registered members may log in to forums and access all the features: full search, image upload, follow forums, own gear list and ratings, likes, more forums, private messaging, thread follow, notifications, own gallery, all settings, view hosted photos, own reviews, see more and do more... and all is free. Don't be a stranger - register now and start posting!


COOKIES DISCLAIMER: This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and to our privacy policy.
Privacy policy and cookie usage info.


POWERED BY AMASS forum software 2.58forum software
version 2.58 /
code and design
by Pekka Saarinen ©
for photography-on-the.net

Latest registered member is Thunderstream
1863 guests, 100 members online
Simultaneous users record so far is 15,144, that happened on Nov 22, 2018

Photography-on-the.net Digital Photography Forums is the website for photographers and all who love great photos, camera and post processing techniques, gear talk, discussion and sharing. Professionals, hobbyists, newbies and those who don't even own a camera -- all are welcome regardless of skill, favourite brand, gear, gender or age. Registering and usage is free.