This is a discussion on "verticle align image problem" within the Web Page Design section. This forum, and the thread "verticle align image problem are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
verticle align image problem
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
verticle align image problem
Hi guys,
I've got an img inside a div, how can I center it vertically with the div? This is my code:
Thanks |
|
|
|
#2
|
|||
|
|||
|
Re: verticle align image problem
nevermind!
solution found lol:
|
|
#3
|
|||
|
|||
|
Re: verticle align image problem
Probably the simplest method if you know the height of the image, as you do in your example. Things get more complicated if the height of the content is variable.
top: 50% moves the image down to the half way point, then the negative top margin (half the value of the image height, drags it up to be centrally aligned.
|
![]() |
| Tags |
| verticle align |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| div align problem | vobla | Web Page Design | 10 | Apr 8th, 2008 09:52 |
| Verticle Alignment? | PicoDeath | Web Page Design | 1 | Jul 27th, 2007 18:21 |
| textformat.align problem | janper | Flash & Multimedia Forum | 1 | Apr 13th, 2007 21:57 |
| center align text/background image | Lchad | Web Page Design | 5 | Dec 5th, 2006 10:40 |
| Align problem | Amphersand | Web Page Design | 3 | Oct 11th, 2006 17:11 |