943,854 Members | Top Members by Rank

Ad:
Aug 21st, 2006
0

Vertical Align Image

Expand Post »
This is doing my nut in as I'm sure it must be really simple. All I want to do is display an image in the center of my webpage vertically and horizontally:

http://www.blackdrop.org/

What do I need to do and thanks for any help!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
MrScruff is offline Offline
89 posts
since Nov 2004
Aug 21st, 2006
0

Re: Vertical Align Image

Im not sure what your asking. How are you going to display the same image two different ways. Or do you mean you want to position it in the center of the page.
you most likely want to use css for this and absolute position the image.

HTML and CSS Syntax (Toggle Plain Text)
  1. img.center {
  2. position:absolute;
  3. top:25%; /*change to fit*/
  4. left:45%;/*change for page*/
  5. }
  6. <!--Then your html should be-->
  7. <img class="center" src="MFTP.jpg" alt="" />

I would recommend not using tables for your webpage as well.
Last edited by mikeandike22; Aug 21st, 2006 at 11:26 am.
Reputation Points: 33
Solved Threads: 19
Nearly a Posting Virtuoso
mikeandike22 is offline Offline
1,496 posts
since May 2004
Aug 21st, 2006
0

Re: Vertical Align Image

That won't center it in the browser window, though...will it?

I mean, it will work for a specific resolution on a specific browser, but not across all platforms.
Team Colleague
Reputation Points: 92
Solved Threads: 21
Posting Pro in Training
FC Jamison is offline Offline
436 posts
since Jun 2004
Aug 21st, 2006
0

Re: Vertical Align Image

yea I know but the more content you add the longer the page is gonna get anyways. So it can never truly be center w/o javascript im assuming or possibly you could use the vertical-align property in css and set it to middle.
Reputation Points: 33
Solved Threads: 19
Nearly a Posting Virtuoso
mikeandike22 is offline Offline
1,496 posts
since May 2004
Sep 22nd, 2006
0

Re: Vertical Align Image

I would recommend not using tables for your webpage as well.
i hate to dig up old threads but i was wondering why you dont recommend tables?
Reputation Points: 152
Solved Threads: 39
Master Poster
Killer_Typo is offline Offline
778 posts
since Apr 2004
Sep 22nd, 2006
0

Re: Vertical Align Image

Let's not start that debate again. It's been covered here, there, and everywhere already.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Sep 22nd, 2006
0

Re: Vertical Align Image

Click to Expand / Collapse  Quote originally posted by tgreer ...
Let's not start that debate again. It's been covered here, there, and everywhere already.
:-| i wasnt looking for a debate, i was just looking for a different way to try and design my pages. im always open to different methods, especially if i see an increase in usability and decrease in overall load times and all that jazz.
Reputation Points: 152
Solved Threads: 39
Master Poster
Killer_Typo is offline Offline
778 posts
since Apr 2004
Sep 22nd, 2006
0

Re: Vertical Align Image

Cool. The main debate is "tables" vs. XHTML with divs and CSS. I just didn't want that hashed out again, as it gets political.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Scroll Bar color change
Next Thread in HTML and CSS Forum Timeline: Making a Background Image a Link





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC