Text is not middle aligned in IE

Discussion in 'CSS' started by mark_s, Jan 6, 2009.

  1. #1
    In Firefox, the "Sign up..." text next to the login area at the top right of this page is perfectly aligned in the middle. However, in IE6/7/8, the text is bottom aligned which looks really ugly, anyone know how I can fix this?

    Thanks in advance :)
     
    mark_s, Jan 6, 2009 IP
  2. sampathsl

    sampathsl Guest

    Messages:
    861
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can write padding top to both IE and firefox. This will solve the trouble.
     
    sampathsl, Jan 6, 2009 IP
  3. mark_s

    mark_s Peon

    Messages:
    497
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That did not help... I gave the links a class and added padding to the bottom but it didn't change anything. Please remember that the text is within <form> and cannot have <div> or <span> tags around it.

    <form action="http://www.murraysworld.com/talk/index.php?action=login2" method="post" style="margin: 0pt;">
    						<strong><a class="quick_login_text" href="http://www.murraysworld.com/talk/index.php?action=register">Sign Up</a></strong> | <a class="quick_login_text" href="http://www.murraysworld.com/talk/index.php?action=reminder">Forgotten your password?</a><label for="user"> <input class="inputtext" name="user" value="Username:" onfocus="if (value == 'Username:') { value = ''; }" onblur="if (value == '') { value = 'Username:'; }" type="text"></label>	
    						<label for="passwrd"> <input name="passwrd" class="inputtext" id="password" type="password"></label>
    					 <input name="cookielength" value="-1" type="hidden">
    						<input value="Login" type="submit">
    					</form>
    Code (markup):
    .quick_login_text {
    padding-bottom: 0px !important; // for firefox
    padding-bottom: 5px; // for IE}
    Code (markup):
     
    mark_s, Jan 7, 2009 IP
  4. mark_s

    mark_s Peon

    Messages:
    497
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Fixed it!

    .quick_login_text {
    	vertical-align: 0%;
    	*vertical-align: 50%; /* IE 7 and below */
     }
    Code (markup):
     
    mark_s, Jan 7, 2009 IP