Centering image inside of <li>

Discussion in 'CSS' started by LOD, Oct 27, 2009.

  1. #1
    hi guys...
    i'm trying to center an image inside of <li> tag. the image should be centered from top and left... now i've easily been able to make it centered from left by using
    text-align:middle;
    but how can i make it centered from top???

    i know the same effect can be achieved on a table using
    vertical-align:middle;

    but this same CSS isnt working on <li> tag... :confused:

    please help me out...
     
    LOD, Oct 27, 2009 IP
  2. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Answered at Site Point.
     
    Stomme poes, Oct 27, 2009 IP
  3. LOD

    LOD Member

    Messages:
    319
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    35
    #3
    could someone please answer it here.. other than saying no it isnt possible??
     
    LOD, Oct 27, 2009 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Do you want an answer different from the one Paul gave? Or did Paul's not make sense?

    Did you ever post your code? For instance, if your image is a background image instead of an <img> tag, then there's a different way to center those vertically.
     
    Stomme poes, Oct 27, 2009 IP
  5. LOD

    LOD Member

    Messages:
    319
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    35
    #5
    oh no no... paul give the right answer.. i just didnt understand them then... but i do now... :D

    @kasun0777 stop spamming...
     
    LOD, Oct 30, 2009 IP