Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ion-item with a floating ion-label breaks when adding an icon #155

Closed
gigocabrera opened this issue Feb 23, 2016 · 5 comments
Closed

ion-item with a floating ion-label breaks when adding an icon #155

gigocabrera opened this issue Feb 23, 2016 · 5 comments

Comments

@gigocabrera
Copy link

Not sure if this is an ionic 2 issue or ionic-conference-app issue

If I add a left/right icons to an ion-item everything works fine

<ion-item>
    <ion-icon name="leaf" item-left primary></ion-icon>
    <ion-input type="text" placeholder="First Name"></ion-input>
    <ion-icon name="arrow-forward" item-right primary></ion-icon>
</ion-item>

floating_with_left_right_icons_03

If I add a left/right icons to an ion-item with a floating label, it breaks

<ion-item>
  <ion-icon name="leaf" item-left primary></ion-icon>
  <ion-label floating primary>First Name</ion-label>
  <ion-input type="text"></ion-input>
  <ion-icon name="arrow-forward" item-right primary></ion-icon>
</ion-item>

floating_with_left_right_icons_02

If this is by design, can you help me find a solution?

@brandyscarney
Copy link
Member

Yes, this is an ionic issue. I got around it for demo purposes by using absolute positioning on the icons:

https://github.com/driftyco/ionic/blob/2.0/demos/label/main.html#L15-L20
https://github.com/driftyco/ionic/blob/2.0/demos/label/main.html#L58-L68

This issue will resolve it: ionic-team/ionic-framework#5319

@gigocabrera
Copy link
Author

Thank you @brandyscarney you're the best (from one Floridian to another)

@brandyscarney
Copy link
Member

Haha thanks. 😄

@wellington1993
Copy link

Thanks!

@Balaraju1
Copy link

Balaraju1 commented Aug 13, 2018

ion-select and ion-datetime floating label not working in ionic 4 beta 2.

<ion-item>
<ion-label position="floating">Label :</ion-label>
<ion-select>
<ion-option-select></ion-option-select>
<ion-option-select></ion-option-select>
<ion-option-select></ion-option-select>
</ion-select>
</ion-item>

<ion-item>
<ion-label position="floating">Label :</ion-label>
<ion-datetime></ion-datetime>
</ion-item>

image

@ionic-team ionic-team locked as off-topic and limited conversation to collaborators Aug 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants