# Show label to the left of the control and not above

**URL:** <https://discourse.cakephp.org/t/show-label-to-the-left-of-the-control-and-not-above/11494>\
**Category:** Need Help\
**Created:** [September 5, 2023, 4:35pm UTC](https://discourse.cakephp.org/t/show-label-to-the-left-of-the-control-and-not-above/11494 "2023-09-05T16:35:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdeanquin](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/mdeanquin/32/1802_2.png) [@mdeanquin](https://discourse.cakephp.org/u/mdeanquin)\
**Post date:** [September 5, 2023, 4:35pm UTC](https://discourse.cakephp.org/t/show-label-to-the-left-of-the-control-and-not-above/11494/1 "2023-09-05T16:35:29Z")

</div>

How can I show the label to the left of the form control and not above?

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [September 5, 2023, 6:53pm UTC](https://discourse.cakephp.org/t/show-label-to-the-left-of-the-control-and-not-above/11494/2 "2023-09-05T18:53:58Z")

</div>

CSS and/or [Customizing the Templates FormHelper Uses](https://book.cakephp.org/4/en/views/helpers/form.html#customizing-the-templates-formhelper-uses).

---

<div class="post-metadata">

**Author:** ![mdeanquin](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/mdeanquin/32/1802_2.png) [@mdeanquin](https://discourse.cakephp.org/u/mdeanquin)\
**Post date:** [September 5, 2023, 7:29pm UTC](https://discourse.cakephp.org/t/show-label-to-the-left-of-the-control-and-not-above/11494/3 "2023-09-05T19:29:46Z")

</div>

That’s the question, how do I change the css for the label in the creation of the form control? I am creating the control with this code: `$this->Form->control('profile_id', ['label' => 'Perfil', 'labelOptions' => ['class' => 'left'], 'options' => $profiles, 'empty' => '- Seleccione un perfil -', 'id' => 'profile_id'])` and is not putting the attribute class=“left” in the label, how can I solve this issue?

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [September 5, 2023, 7:59pm UTC](https://discourse.cakephp.org/t/show-label-to-the-left-of-the-control-and-not-above/11494/4 "2023-09-05T19:59:59Z")

</div>

That’s a much better formulation of the question. You’ve shown what you tried, and have a specific thing that you think should be working (`'class' => 'left'`), but it’s not. Far easier for people to solve for you than “How do I…” I don’t have an answer for you right at this moment, but nevertheless… 🙂

---

<div class="post-metadata">

**Author:** ![mdeanquin](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/mdeanquin/32/1802_2.png) [@mdeanquin](https://discourse.cakephp.org/u/mdeanquin)\
**Post date:** [September 5, 2023, 8:34pm UTC](https://discourse.cakephp.org/t/show-label-to-the-left-of-the-control-and-not-above/11494/5 "2023-09-05T20:34:26Z")

</div>

Yes, you are right, sorry, I broke the creation of the form control in two parts, in one part I create the label with `$this->Form->label('profile_id', 'Perfil', ['class' => 'left'])` and in the other I create a select control with `$this->Form->select('profile_id', $profiles, ['empty' => '- Seleccione un perfil -', 'id' => 'profile_id'])` and now it adds the class=“left” attribute, thank you nevertheless
