Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7774835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:28:39+00:00 2026-06-01T17:28:39+00:00

This issue has been driving me crazy all morning. I’ve been trying to get

  • 0

This issue has been driving me crazy all morning. I’ve been trying to get my input field with a custom background to align correctly in IE. I read other questions that said line-height will fix it, but that hasn’t been working.

It looks fine in chorme/safari/etc but in IE8 the text is stuck to the top of the input area. (Stack won’t let me post images yet). My CSS is:

#email {
background: url('BACKGROUND IMAGE') left top no-repeat;
background-size: 273px 38px;
width: 273px;
height: 38px;
line-height: 38px;
border: 0;
margin: 0 0 5px;
font: bold 12px arial, helvetica, sans-serif;
color: #777;
padding:0 8px;
outline: none;
float:left;
}

and the HTML:

<input id="email" type="text" name="email" size="14" value="your email address" onfocus="if(this.value=='your email address') {this.style.color='#333'; this.value='';}" onblur="if(this.value== '') {this.style.color='#808080'; this.value='your email address';}" />

Any ideas on how to get my input text to vertically center in IE 8 and lower?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:28:41+00:00Added an answer on June 1, 2026 at 5:28 pm

    This should be easy to fix. The line-height property is important, but it seems to get lost in IE8 when you’re using the shorthand font property. Try adding in the line-height to the shorthand font property, and removing the line-height that you have declared separately.

    #email {
    background: url('BACKGROUND IMAGE') left top no-repeat;
    background-size: 273px 38px;
    width: 273px;
    height: 38px;
    border: 0;
    margin: 0 0 5px;
    font: bold 12px/38px arial, helvetica, sans-serif;
    color: #777;
    padding:0 8px;
    outline: none;
    float:left;
    border:1px solid #999;
    }
    

    Here’s a jsFiddle example for you (border added just to show how it’s aligning).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

so I am having this issue that has been driving me crazy for hours,
This is driving me crazy, and has been bugging me for weeks, I'm trying
I have an AutoMapper issue that has been driving me crazy for way too
Update: This issue has been resolved. I was trying to authenticate various admin accounts
This has been driving me crazy the past few days. I wrote a program
This issue has been driving me up a wall. I've been working on a
This issue has been driving me insane. On two separate projects (both of which
I hope someone can help me. This has been driving me crazy for days.
Greetings all, I realize this issue has been posed before in other forms, and
This issue has been on/off bugging me and I've written 4 wrappers now. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.