Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Font Awesome accordion arrows jump on mobile

Contributor ,
Jan 14, 2019 Jan 14, 2019

Hi everyone,

I have an accordion I built which works great but the arrows are dropping on mobile devices. Is there a way to get them to stay on the first line of text? Below is a link and screenshot of what I'm seeing.

Thank you

Slide Panels

Screen Shot 2019-01-14 at 9.24.42 AM.png

638
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 14, 2019 Jan 14, 2019

Change to 'before' instead of 'after' and comment out both of the float: left; (as below). See if that gets you to where you want to be.

.accordion h3:before {

/*float: left;*/

content: '\f105';

color: #0091b3;

font-weight: bold;

    font-family: "FontAwesome";

font-size: 30px;

    line-height:25px;

    padding: 0px 15px 0px 10px;

}

.active h3:before {

/*float: left;*/

content: "\f107";

color: #0091b3;

font-weight: bold;

font-size: 30px;

    font-family: "FontAwesome";

    padding: 0px 15px 0px 10px;

}

You dont nee

...
Translate
LEGEND ,
Jan 14, 2019 Jan 14, 2019

Change to 'before' instead of 'after' and comment out both of the float: left; (as below). See if that gets you to where you want to be.

.accordion h3:before {

/*float: left;*/

content: '\f105';

color: #0091b3;

font-weight: bold;

    font-family: "FontAwesome";

font-size: 30px;

    line-height:25px;

    padding: 0px 15px 0px 10px;

}

.active h3:before {

/*float: left;*/

content: "\f107";

color: #0091b3;

font-weight: bold;

font-size: 30px;

    font-family: "FontAwesome";

    padding: 0px 15px 0px 10px;

}

You dont need all of the 'repeat' attributes - you can just use:

.accordion h3:before {

content: '\f105';

color: #0091b3;

font-weight: bold;

font-family: "FontAwesome";

font-size: 30px;

line-height:25px;

padding: 0px 15px 0px 10px;

}

.active h3:before {

content: "\f107";

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 14, 2019 Jan 14, 2019
LATEST

Thanks osgood!!! Thank worked perfectly. Have a great day!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines