Input field text vs place holder

Hi I need help with the placeholder vs. text inside the input field
I have a few css on my input field because it has a font awesome on it, but when i type the text starts in the middle.
is there a way to fix it? when i right to make it to the left, the place holder got messed up as well.
Please advise!


.Rectangle_input {
  width: 210px;
  height: 50px;
  border-radius: 4px;
  background-color: #ffffff;
  border: solid 1px #dddce0;
  margin-top:10px;
}
.foodadvice {
font-family:open_sansregular;
  font-size: 16px;
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
  line-height: normal;
  letter-spacing: normal;
  text-align: center;
  color: #847d7b;
}
.freeadvice_icon{
position: absolute;
    margin-left: -207px;
    margin-top: 21px;
    font-size: 24px;
    color: #CAC8BF;
}
<span>
<input class="Rectangle_input foodadvice"  placeholder="Free food&#8230;advice"/>
 <i class="fa fa-envelope freeadvice_icon"></i>
<button class="sub_footer" style="padding-top: 4px;">SUBMIT</button>
</span>

Open in new window

LVL 1
Jazzy 1012Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ste5anSenior DeveloperCommented:
Well, what is what you want? It's not clear.. also which environment is failing?

E.g. in Edge it works as intented (text-align:center):

Capture1.PNGCapture2.PNG
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jazzy 1012Author Commented:
I want the input field to start from the beginning; right after the mail icon
0
Jazzy 1012Author Commented:
yes I did not even notice the text-align! Thank you soo much you solve my problem!
0
ste5anSenior DeveloperCommented:
Then just remove the text-align:center or set it to left:

<html>
	<head>
		<style>
			.Rectangle_input {
				width: 210px;
				height: 50px;
				border-radius: 4px;
				background-color: #ffffff;
				border: solid 1px #dddce0;
				margin-top:10px;
			}
			.foodadvice {
				font-family:open_sansregular;
				font-size: 16px;
				font-weight: normal;
				font-style: normal;
				font-stretch: normal;
				line-height: normal;
				letter-spacing: normal;
				text-align: left;
				color: #847d7b;
			}
			.freeadvice_icon{
				position: absolute;
				margin-left: -207px;
				margin-top: 21px;
				font-size: 24px;
				color: #CAC8BF;
			}	
		</style>
	</head>
	<body>
		<span>
			<input class="Rectangle_input foodadvice"  placeholder="Free food&#8230;advice"/>
			<i class="fa fa-envelope freeadvice_icon"></i>
			<button class="sub_footer" style="padding-top: 4px;">SUBMIT</button>
		</span>
	</body>
</html>

Open in new window


Capture1.PNGCapture2.PNG
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.