DPChallenge: A Digital Photography Contest You are not logged in. (log in or register
 

DPChallenge Forums >> Photography Discussion >> Coding Help.
Pages:  
Showing posts 1 - 11 of 11, (reverse)
AuthorThread
08/30/2006 08:33:29 PM · #1
Hey I'm just playing around with html trying to make a website for my photography. I don't really know where else to post this, so hopefully someone here will be able to help since so many of you have your own photo sites.

HERE is the site as it is right now, I've just started this tonight, so there's not much.

What I'm trying to do is make the main image centered horizontally and vertically, does anyone know how to do that?

Edit: wrong link, oops. ;P

Message edited by author 2006-08-30 20:34:10.
08/30/2006 08:46:01 PM · #2
Put it in a table.... valign='middle' align='center'
08/30/2006 08:51:48 PM · #3


You could also use a
or a . Position on the screen can probably best be handled with some expectation of consistency by using CSS and applying properties to an object like the
tag above.

Quick example w/out stylesheets:

Text to center


You could put it into a table but then you'd need to add a row and a cell
08/30/2006 08:55:14 PM · #4
I would just like to throw it out there that my knowlege of html is pretty small, I thought that would be apparent from the very simple coding in the layout.

I have no idea what you guys just said.
08/30/2006 08:56:02 PM · #5
Right now the image is listed outside your body tag. All of your main tag should be inside of a body tag. You also have multiple html and body tags when you really only need one of each. Try this:



WEBSITE IN PROGRESS!










Message edited by author 2006-08-30 20:56:53.
08/30/2006 08:57:37 PM · #6
If you are coding HTML by hand, you are doing it the hard way :-) It's fun, but unnessecary :-)

If you need a good, free HTML editor... try this : //www.nvu.com

Message edited by author 2006-08-30 20:57:58.
08/30/2006 09:00:51 PM · #7
Originally posted by ckallies:

Right now the image is listed outside your body tag. All of your main tag should be inside of a body tag. You also have multiple html and body tags when you really only need one of each. Try this:



WEBSITE IN PROGRESS!










Thanks for making it a lot easier to work with, it's what I need except for I can't get it centered vertically.
08/30/2006 09:03:17 PM · #8
Originally posted by ckallies:

Right now the image is listed outside your body tag. All of your main tag should be inside of a body tag. You also have multiple html and body tags when you really only need one of each. Try this:



WEBSITE IN PROGRESS!












[/quote]

Message edited by author 2006-08-30 21:07:06.
08/30/2006 09:05:35 PM · #9
Vertically centered is difficult, because the height of the browser window can vary.

In terms of spacing, however, there are a number of ways to do it. One of the most browser indpendent methods is to use a 1 pixel "clear" graphic and set its height to the number of pixels you wish to create vertical space. There are better ways, but they can be browser version-dependent.
08/30/2006 09:16:24 PM · #10
Originally posted by Palmetto_Pixels:

Originally posted by ckallies:

Right now the image is listed outside your body tag. All of your main tag should be inside of a body tag. You also have multiple html and body tags when you really only need one of each. Try this:



WEBSITE IN PROGRESS!












[/quote]

Thank you SOOOO much! That worked, I've been trying to get this for over an hour.
08/31/2006 04:07:20 AM · #11
It's a personal bugbear of mine, but that wouldn't render on a lot of devices because of the outdated language.

Vertical alignment is a funny one, because it assumes that the object is being rendered on a page that has a middle. It's also historically not been catered for all that well.

If you're only dealing with one element, then you could probably leave a 33% top margin, and have the object appear roughtly where you want it on the page. If you're displaying more than one (vertical) element, then aligning them to page centre makes no sense, really.

Anyway, an alternate way of doing this -







My Page

















I realise that you've done it now, so probably won't be bothered to change it, but, really, CSS is the way forward.
Pages:  
Current Server Time: 08/01/2025 10:30:01 PM

Please log in or register to post to the forums.


Home - Challenges - Community - League - Photos - Cameras - Lenses - Learn - Help - Terms of Use - Privacy - Top ^
DPChallenge, and website content and design, Copyright © 2001-2025 Challenging Technologies, LLC.
All digital photo copyrights belong to the photographers and may not be used without permission.
Current Server Time: 08/01/2025 10:30:01 PM EDT.