# Responsive floating bottom CTA bar

**URL:** <https://community.hubspot.com/t/responsive-floating-bottom-cta-bar/23429>\
**Category:** CMS Development\
**Created:** [July 27, 2020, 4:46pm UTC](https://community.hubspot.com/t/responsive-floating-bottom-cta-bar/23429 "2020-07-27T16:46:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moore](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/moore/32/27089_2.png) [@Moore](https://community.hubspot.com/u/Moore)\
**Post date:** [July 27, 2020, 4:46pm UTC](https://community.hubspot.com/t/responsive-floating-bottom-cta-bar/23429/1 "2020-07-27T16:46:46Z")

</div>

I need help getting my foating bar to be responsive. It has three CTA with Icons. I am having problems with different screen sizes and having the bar not go all the way across bottom of screen. I need it to change to a lighter color when hovered as well. Any help will be greatly appreciated.

Here is the code I have now.

\<script src=“[https://kit.fontawesome.com/ab936ec08f.js](https://kit.fontawesome.com/ab936ec08f.js)” crossorigin=“anonymous”\>\</script\>

\<div id=“mybar”\>  
\<ul class=“floating-bar”\>

\<li\>\<a href="[https://info.patientmatters.com/rcm-insights"\>Subscribe](https://community.hubspot.com/) to RCM Insights \ \<i class=“far fa-envelope”\>\</i\>\</a\>\</li\>  
\<li\>\<a href="[https://info.patientmatters.com/contact-sales"\>Contact](https://community.hubspot.com/) Sales \ \<i class=“far fa-address-card”\>\</i\>\</a\>\</li\>  
\<li\>\<a href="[https://info.patientmatters.com/schedule-a-demo"\>Schedule](https://community.hubspot.com/) a Demo \ \<i class=“far fa-calendar-alt”\>\</i\>\</a\>\</li\>  
\</ul\>

\</div\>

floating-bar {  
list-style-type: none;  
margin: 0px;  
padding: 25px;  
padding-top: 20px;  
padding-right: 25px;  
padding-bottom: 20px;  
padding-left: 25px;  
overflow: hidden;  
background-color: #30d9c5;  
position: fixed;  
bottom: 0;  
padding-right: 59px;  
overflow-x: auto;  
display: flex;  
align-items: center;  
justify-content: center;  
min-width: 50px;  
white-space: nowrap;  
}

li {  
float: left;  
}

li a {  
color: white;  
text-align: center;  
padding: 45px 150px;  
text-decoration: none;  
}

---

<div class="post-metadata">

**Author:** ![JanetArmstrong](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/janetarmstrong/32/99730_2.png) [@JanetArmstrong](https://community.hubspot.com/u/JanetArmstrong)\
**Post date:** [July 28, 2020, 11:55am UTC](https://community.hubspot.com/t/responsive-floating-bottom-cta-bar/23429/2 "2020-07-28T11:55:34Z")

</div>

I think you have some issues with duplicate padding and other things in your css. Can you post a url and I’ll take a look?  
To create a different color on hover you add :hover to any selector in the css.

a:hover {

color: #something;

}

---

<div class="post-metadata">

**Author:** ![Moore](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/moore/32/27089_2.png) [@Moore](https://community.hubspot.com/u/Moore)\
**Post date:** [July 28, 2020, 2:47pm UTC](https://community.hubspot.com/t/responsive-floating-bottom-cta-bar/23429/3 "2020-07-28T14:47:48Z")

</div>

Hi Janet,

Thank you for looking this over for me. Here is the link

[https://app.hubspot.com/design-previewer/5006213/templates/32303876918](https://app.hubspot.com/design-previewer/5006213/templates/32303876918)

Chris

---

<div class="post-metadata">

**Author:** ![Moore](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/moore/32/27089_2.png) [@Moore](https://community.hubspot.com/u/Moore)\
**Post date:** [July 28, 2020, 4:38pm UTC](https://community.hubspot.com/t/responsive-floating-bottom-cta-bar/23429/4 "2020-07-28T16:38:24Z")

</div>

Hi Janet,

Here are some screenshots with the problem I am running into with the CTA floating bar.

 ![29715i508C44E48F2D7014.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/e/de4b74a8db731ae9b0a473d8c6851f2270154233.jpeg)

 ![29716i29C6EE22B51CF6B2.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/a/5acf5dd67a6481de1b84beef8b144dfc38acc850.png)

 ![29717i6EE61C24E75DCD08.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/3/03c39eac2d419af69d1eb013c243d1076bb24355.png)

 ![29718i23C3535258424C15.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/a/3ae87c9c47e2c7d2ebf2c1a10de279ec03cbc998.png)

 ![29719iB12EC777D90FCC24.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/2/6228751873f6f92a2b1746ddce58a90b78d69295.jpeg)

 ![29720iFAEA8C668AB1E841.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/c/6c87d1ce86641f45cca117e4cb14e095f385a15d.png)

 ![29721i270BE6A9EA666F7E.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/e/ee4a9908dfece7fbd7e8fc2b309571242d77a88a.jpeg)

---

<div class="post-metadata">

**Author:** ![JanetArmstrong](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/janetarmstrong/32/99730_2.png) [@JanetArmstrong](https://community.hubspot.com/u/JanetArmstrong)\
**Post date:** [July 28, 2020, 6:02pm UTC](https://community.hubspot.com/t/responsive-floating-bottom-cta-bar/23429/5 "2020-07-28T18:02:09Z")

</div>

you have padding on the li a at 150px-left and right.

It won’t fit on smaller screens, which is why those aren’t floating right anymore.

insteach of using padding, why don’t you make each li 33% so they stretch across?

---

<div class="post-metadata">

**Author:** ![JanetArmstrong](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/janetarmstrong/32/99730_2.png) [@JanetArmstrong](https://community.hubspot.com/u/JanetArmstrong)\
**Post date:** [July 28, 2020, 6:02pm UTC](https://community.hubspot.com/t/responsive-floating-bottom-cta-bar/23429/6 "2020-07-28T18:02:43Z")

</div>

I would really need to look at the live url to see what’s going on.

---

<div class="post-metadata">

**Author:** ![Moore](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/moore/32/27089_2.png) [@Moore](https://community.hubspot.com/u/Moore)\
**Post date:** [July 28, 2020, 6:23pm UTC](https://community.hubspot.com/t/responsive-floating-bottom-cta-bar/23429/7 "2020-07-28T18:23:43Z")

</div>

Hi Janet,

thank you for the help so far. Here is a working link to see what is going on [https://info.patientmatters.com/test](https://info.patientmatters.com/test).

---

<div class="post-metadata">

**Author:** ![JanetArmstrong](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/janetarmstrong/32/99730_2.png) [@JanetArmstrong](https://community.hubspot.com/u/JanetArmstrong)\
**Post date:** [July 28, 2020, 7:02pm UTC](https://community.hubspot.com/t/responsive-floating-bottom-cta-bar/23429/8 "2020-07-28T19:02:05Z")

</div>

```auto
 .floating-bar {
 list-style-type: none;
 margin: 0px;
 background-color: #30d9c5;
 position: fixed;
 bottom: 0;
 left: 0;
 display: table;
 width: 100%;
}
li {
 display: table-cell;
 text-align: center;
}
li a {
 color: white;
 text-decoration: none;
 display: block;
 padding: 6px
}
li a:hover {
 background:#000;
}
@media all and (max-width: 650px) {
 li a {
 font-size: 14px;
 }
}
@media all and (max-width: 500px) {
 li a {
 font-size: 12px;
 }
}

```

I think that will get you what you’re wanting.

---

<div class="post-metadata">

**Author:** ![Moore](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/moore/32/27089_2.png) [@Moore](https://community.hubspot.com/u/Moore)\
**Post date:** [July 29, 2020, 12:47pm UTC](https://community.hubspot.com/t/responsive-floating-bottom-cta-bar/23429/9 "2020-07-29T12:47:11Z")

</div>

This works, thank you for your help.
