user1662306 user1662306 - 5 months ago 10
HTML Question

Centering a Placeholder and Input Text in a Text Field

I was wondering if it was possible to center a placeholder and the input which the user will enter in the Text Field. I imagine it would be possible yet I cant figure it out. could anyone help? my code for the Text Field in question is below...

<input type="text" style="font-weight:bold:" name="kword" id="kword" autofocus ="on" placeholder="Enter Keyword(s)" autocomplete ="on"/>


Thanks

Answer

..........................................

Demo

Hi now used to text-align:center

this css

input, input[placeholder]{
font-weight:bold;
    color:red;
    text-align:center;

}