1

hello guys i am having trouble with firefox

this code is working very nicely on safari and chrome but not firefox and driving me crazy

this is how it looks in firefox: (all elements seem unattached to their parents go beyond the container)

I have tried searching for maybe style names specific to firefox but i am unable to find more than what i have already added to my syles

firefox

also attached code snippet

.reviews {
  margin: 0 0 15px 0;
  border-radius: 5px;
  box-shadow: 0 1px 16px 0 rgba(110, 110, 110, 0.3);
  padding: 15px;
  height: 100px;
}

.reviews__form {
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  -ms-flex-direction: row;
  flex-direction: row;
  justify-content: flex-start;
  -moz-box-align: center;
  align-items: center;
  border-radius: 5px;
  height: 100%;
}

.reviews__textbox {
  flex: 1;
  resize: none;
  height: 100%;
  border-radius: 5px;
  border: none;
}

.reviews__rate {
  background: url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0Ljk1IDEwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9LmNscy0ye2ZpbGw6IzQ0NDt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmFycm93czwvdGl0bGU+PHJlY3QgY2xhc3M9ImNscy0xIiB3aWR0aD0iNC45NSIgaGVpZ2h0PSIxMCIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtMiIgcG9pbnRzPSIxLjQxIDQuNjcgMi40OCAzLjE4IDMuNTQgNC42NyAxLjQxIDQuNjciLz48cG9seWdvbiBjbGFzcz0iY2xzLTIiIHBvaW50cz0iMy41NCA1LjMzIDIuNDggNi44MiAxLjQxIDUuMzMgMy41NCA1LjMzIi8+PC9zdmc+) no-repeat 98% 50%;
  background-size: 50%;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  height: 100%;
  min-width: 50px;
  padding-left: 5px;
  border-radius: 0;
  outline: none;
  border: none;
}

.reviews__publish {
  outline: none;
  height: 100%;
  color: white;
  border: none;
  background-color: #400082;
}
<div class="reviews">
  <form class="reviews__form">
    <textarea class="reviews__textbox" placeholder="review comment goes here" name="comment" cols="80" rows="3" value="some text"></textarea>
    <select class="reviews__rate" name="rate" value="5">
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
    </select>
    <input class="reviews__publish" type="submit" value="publish" />
  </form>
</div>
Raffi
  • 699
  • 1
  • 8
  • 19

1 Answers1

3

For some reason flexbox in Firefox is treating the textarea differently to a regular block element. Add in a min-width: 0; to the textarea and you should be good.

Tim
  • 118
  • 8
  • 1
    Remember that CSS like this will affect all browsers, so best test it with more than just FireFox. – Paul Dec 30 '20 at 17:04
  • omg finally i have been trying to resolve it for 2 hours, i would love it if you can explain how you found out the problem. – Raffi Dec 30 '20 at 17:08
  • 1
    @Raffi I don't understand the specifics but I've seen it used in the past as a method to fix flex issues with inputs and textareas in Firefox, so thought it was worth a shot – Tim Dec 30 '20 at 17:24