# Finishing touches on Random Quote Machine

**URL:** <https://forum.freecodecamp.org/t/finishing-touches-on-random-quote-machine/66930>\
**Category:** General\
**Created:** [December 19, 2016, 2:12am UTC](https://forum.freecodecamp.org/t/finishing-touches-on-random-quote-machine/66930 "2016-12-19T02:12:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stigant](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@Stigant](https://forum.freecodecamp.org/u/Stigant)\
**Post date:** [December 19, 2016, 2:12am UTC](https://forum.freecodecamp.org/t/finishing-touches-on-random-quote-machine/66930/1 "2016-12-19T02:12:40Z")

</div>

Hi everyone, after a full day of work I’ve managed to put together a Random Quote machine I’m quite happy with - [https://codepen.io/Stigant/full/KNJgWP/](https://codepen.io/Stigant/full/KNJgWP/). I just have a small issues I cannot seem to iron out, whenever I press on the new quote button, the colour changes. I think this is bootstraps doing, but I cannot seem to stop it from happening. I’ve tried googling the issue but nothing I could find works. Has anyone got any ideas? Or perhaps just more general feedback on my project?

Thanks,  
Liam 🙂

---

<div class="post-metadata">

**Author:** ![kevcomedia](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevcomedia/32/125737_2.png) [@kevcomedia](https://forum.freecodecamp.org/u/kevcomedia)\
**Post date:** [December 19, 2016, 2:19am UTC](https://forum.freecodecamp.org/t/finishing-touches-on-random-quote-machine/66930/2 "2016-12-19T02:19:01Z")

</div>

Are you talking about how the text changes color when you hover or click? You can throw in this rule so the text remains white.

```css
.button:hover,
.button:focus {
  color: white;
}

```

---

<div class="post-metadata">

**Author:** ![codefu-chivy](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codefu-chivy/32/67050_2.png) [@codefu-chivy](https://forum.freecodecamp.org/u/codefu-chivy)\
**Post date:** [December 19, 2016, 2:25am UTC](https://forum.freecodecamp.org/t/finishing-touches-on-random-quote-machine/66930/3 "2016-12-19T02:25:37Z")

</div>

I really like the format! I did notice, however, that the heading seems to re-render every time you get a new quote. I would try to keep the heading static. Also, against some of the backgrounds, the quote text gets a little harder to read.

---

<div class="post-metadata">

**Author:** ![Stigant](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@Stigant](https://forum.freecodecamp.org/u/Stigant)\
**Post date:** [December 19, 2016, 2:35am UTC](https://forum.freecodecamp.org/t/finishing-touches-on-random-quote-machine/66930/4 "2016-12-19T02:35:35Z")

</div>

Oops, I was using .button:active:focus… Thanks very much. 😄

---

<div class="post-metadata">

**Author:** ![Stigant](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@Stigant](https://forum.freecodecamp.org/u/Stigant)\
**Post date:** [December 19, 2016, 2:43am UTC](https://forum.freecodecamp.org/t/finishing-touches-on-random-quote-machine/66930/5 "2016-12-19T02:43:33Z")

</div>

Thanks very much 🙂 I’ve upped the opacity on the quote box which should make reading easier. I wanted to keep the header static but couldn’t work out how to do it. I had to use a div to get the background image to animate properly, $(‘html’).animate doesn’t seem to work, and then couldn’t find a way of putting the heading inside the div and still keep it static.

---

<div class="post-metadata">

**Author:** ![codefu-chivy](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codefu-chivy/32/67050_2.png) [@codefu-chivy](https://forum.freecodecamp.org/u/codefu-chivy)\
**Post date:** [December 19, 2016, 2:59am UTC](https://forum.freecodecamp.org/t/finishing-touches-on-random-quote-machine/66930/6 "2016-12-19T02:59:36Z")

</div>

No problem! If you are animating that entire background div, I would suggest taking the heading outside of this div and putting it inside its own div that you can call title or something along those lines. As it is now, the heading is a child of the background div, so anything applied to it will affect the heading also.

---

<div class="post-metadata">

**Author:** ![Stigant](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@Stigant](https://forum.freecodecamp.org/u/Stigant)\
**Post date:** [December 20, 2016, 1:16am UTC](https://forum.freecodecamp.org/t/finishing-touches-on-random-quote-machine/66930/7 "2016-12-20T01:16:14Z")

</div>

When I do that the div with the background image shrinks so the heading appears above the photo, which I don’t really like. Is there a way to have the divs overlap? If not I could always just remove the heading completely.

---

<div class="post-metadata">

**Author:** ![Stigant](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@Stigant](https://forum.freecodecamp.org/u/Stigant)\
**Post date:** [December 20, 2016, 1:42am UTC](https://forum.freecodecamp.org/t/finishing-touches-on-random-quote-machine/66930/8 "2016-12-20T01:42:08Z")

</div>

Turns out such things are indeed possible. Heading is now static :). Thanks for the suggestion.

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [January 16, 2021, 6:10am UTC](https://forum.freecodecamp.org/t/finishing-touches-on-random-quote-machine/66930/9 "2021-01-16T06:10:57Z")

</div>

Closed on January 16, 2021, 6:10am UTC


