# Aspect-ratio property not working in my css

**URL:** <https://forum.freecodecamp.org/t/aspect-ratio-property-not-working-in-my-css/519827>\
**Category:** Curriculum Help\
**Tags:** css, html\
**Created:** [June 20, 2022, 3:02am UTC](https://forum.freecodecamp.org/t/aspect-ratio-property-not-working-in-my-css/519827 "2022-06-20T03:02:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![manshouri](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@manshouri](https://forum.freecodecamp.org/u/manshouri)\
**Post date:** [June 20, 2022, 3:02am UTC](https://forum.freecodecamp.org/t/aspect-ratio-property-not-working-in-my-css/519827/1 "2022-06-20T03:02:40Z")

</div>

**Tell us what’s happening:**  
Describe your issue in detail here.  
aspect-ratio property not working in my css, i have tried to change the width against the height as described but it continues not to work  
some help please

```
   **Your code so far**

```

```html
/* file: index.html */
<!DOCTYPE html>
<html lang="en">
 <head>
   <meta charset="UTF-8" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
   <meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
   <title>Accessibility Quiz</title>
   <link rel="stylesheet" href="styles.css" />
 </head>
 <body>
   <header>
     <img id="logo" src="https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg">
     <h1>HTML/CSS Quiz</h1>
     <nav></nav>
   </header>
   <main></main>
 </body>
</html>

```

```css
/* file: styles.css */
body {
	background: #f5f6f7;
	color: #1b1b32;
	font-family: Helvetica;
	margin: 0;
}

#logo {
 width: max(100px, 18vw);
	aspect-ratio: 35 / 4;
	background-color: #0a0a23;	
	padding: 0.4rem;

}

```

```
   **Your browser information:**

```

User Agent is: `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0`

**Challenge:** Step 9

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-accessibility-by-building-a-quiz/step-9)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![bbsmooth](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bbsmooth/32/203556_2.png) [@bbsmooth](https://forum.freecodecamp.org/u/bbsmooth)\
**Post date:** [June 20, 2022, 5:34am UTC](https://forum.freecodecamp.org/t/aspect-ratio-property-not-working-in-my-css/519827/2 "2022-06-20T05:34:07Z")

</div>

Hmm, your `#logo` CSS is passing for me. Ahh, I think I see it now, you’re using a very old version of Firefox and it might not actually support the `aspect-ratio` property. I would upgrade to the newest version.

---

<div class="post-metadata">

**Author:** ![manshouri](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@manshouri](https://forum.freecodecamp.org/u/manshouri)\
**Post date:** [June 20, 2022, 11:37am UTC](https://forum.freecodecamp.org/t/aspect-ratio-property-not-working-in-my-css/519827/3 "2022-06-20T11:37:12Z")

</div>

thanks, let me try to update my browser

---

<div class="post-metadata">

**Author:** ![bbsmooth](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bbsmooth/32/203556_2.png) [@bbsmooth](https://forum.freecodecamp.org/u/bbsmooth)\
**Post date:** [June 20, 2022, 5:06pm UTC](https://forum.freecodecamp.org/t/aspect-ratio-property-not-working-in-my-css/519827/4 "2022-06-20T17:06:31Z")

</div>

I just checked [caniuse](https://caniuse.com/?search=aspect-ratio) and sure enough, it looks like support for `aspect-ratio` didn’t become universal in FF until version 89.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [December 20, 2022, 5:06am UTC](https://forum.freecodecamp.org/t/aspect-ratio-property-not-working-in-my-css/519827/5 "2022-12-20T05:06:52Z")

</div>

Closed on December 20, 2022, 5:06am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
