Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Buscar en Ayuda

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Setting width to an AUDIO element doesn't work anymore

  • 3 respuestas
  • 1 tiene este problema
  • 20 visitas
  • Última respuesta de cor-el

Example: <audio controls style="width:700;"> Can't be done with CSS-file either. Height and some other things can be set, just not width. By setting a background colour, i see it reserve the witdth but doesn't make use it, doesn't fill the area as before. This used to work just fine with versions before 56.0

Example: <audio controls style="width:700;"> Can't be done with CSS-file either. Height and some other things can be set, just not width. By setting a background colour, i see it reserve the witdth but doesn't make use it, doesn't fill the area as before. This used to work just fine with versions before 56.0

Solución elegida

See (fixed 57):

  • bug 1397486 - audio tag doesn't listen to CSS width [ff 56]

(please do not comment in bug reports
https://bugzilla.mozilla.org/page.cgi?id=etiquette.html
)

Leer esta respuesta en su contexto 👍 1

Todas las respuestas (3)

No answer for you. If this is for creating HTML pages : Mozilla adheres to W3C.org code recommendations and standards. So with that no idea if know about on line tools for web pages by them or is what you need. For Html https://validator.w3.org/ for CSS https://jigsaw.w3.org/css-validator/ If this info helps great.

When I test

<audio style="width: 700px" controls>

it seems that the bar Firefox draws won't expand past 270px (same size as width:auto). This rule will stretch it to double width, but it's really ugly:

audio {
  transform: scale(2, 1);
  transform-origin: left;
}

See: https://developer.mozilla.org/docs/Web/CSS/transform-function/scale

I think if you want something more custom, you may need to roll your own.

Or if you think this is a bug, you can file a report: https://bugzilla.mozilla.org/enter_bug.cgi

Solución elegida

See (fixed 57):

  • bug 1397486 - audio tag doesn't listen to CSS width [ff 56]

(please do not comment in bug reports
https://bugzilla.mozilla.org/page.cgi?id=etiquette.html
)