Author Topic: vertical align middle with listing  (Read 688 times)

0 Members and 1 Guest are viewing this topic.

Offline MDanzTopic starter

  • Devotee
  • Posts: 706
    • View Profile
vertical align middle with listing
« on: August 11, 2010, 03:13:43 AM »
the textfield displays at the bottom of the image. when i want it to be centered.  I applied vertical-align:middle but no success.

Code: [Select]
#addtopictostack ul {

vertical-align:middle;

}
#addtopictostack li{
display:inline;
list-style-type:none;

}

Code: [Select]
<ul id='addtopictostack'><li><img src='addtopic2stack.jpg' alt='addtopictostack' /></li><li><input type='text' size='20' value='Type Topic Here' /> <input type='submit' name='submit' value='submit' style='font-size:10px' /></li></ul>

Offline damianjames

  • Irregular
  • Posts: 46
  • Gender: Male
  • C'mon people now, smile on your brother
    • View Profile
Re: vertical align middle with listing
« Reply #1 on: September 08, 2010, 01:15:09 AM »
Have you tried applying it to the image rather than the UL?  You can also try using line-height or a percentage (can be negative) instead of middle for vertical-align for more fine-tuned alignment.
<?PHP echo "Hello, World!"; ?>

Offline haku

  • Guru
  • Freak!
  • *
  • Posts: 5,707
  • Old Man
    • View Profile
Re: vertical align middle with listing
« Reply #2 on: September 08, 2010, 02:47:12 AM »
If you want to align something with an image, you need to set the vertical align on the image.