Bootstrap issue I guess?

I got codes below:

<div class="form-group form-group-sm">
                                <label for="Alternative Date Time">Hire Date:: <span class="compalsory">*</span></label>
                                <div class="input-group date" id="hiredate">
                                    <input type="text" class="form-control" />
                                    <span class="input-group-addon">
                                        <span class="glyphicon glyphicon-calendar"></span>
                                    </span>
                                    <label>&nbsp;</label>
                                </div>
                            </div>

Open in new window


This has generated the following output:

issue.png
As you can see the "Calendar" icon is not aligned with the text field.

How can I changed the codes so that both are aligned properly? Thank you.
trowaAsked:
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.

Julian HansenCommented:
What is line 8 supposed to be doing?
 <label>&nbsp;</label>

Open in new window

Remove that and the problem goes away.
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
trowaAuthor Commented:
Yes, removing that is working!

If you can tell what wrong with this? Sorry to ask again as I can't ask more than one question per month now due to the site new policy.

<div class="input-group date" id="presentation">
                                <label for="presentation">Date/Time of Presentation:</label>
                                <input type="text" class="form-control" />
                                <span class="input-group-addon">
                                    <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>

Open in new window


issue.png
Thank you.
0
Julian HansenCommented:
You have your label inside the input group - it is going to add to the input height.
Put the label OUTSIDE the input-group.
2
trowaAuthor Commented:
This works, thank you!

<label for="presentation">Date/Time of Presentation:</label>
                            <div class="input-group date" id="presentation">
                                <input type="text" class="form-control" />
                                <span class="input-group-addon">
                                    <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>

Open in new window

0
Julian HansenCommented:
You are welcome.
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.