# Fix for popper css margin style warning

**URL:** <https://forum.codewithmosh.com/t/fix-for-popper-css-margin-style-warning/19319>\
**Category:** React\
**Created:** [April 2, 2023, 10:23pm UTC](https://forum.codewithmosh.com/t/fix-for-popper-css-margin-style-warning/19319 "2023-04-02T22:23:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![isimmons33](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/isimmons33/32/2403_2.png) [@isimmons33](https://forum.codewithmosh.com/u/isimmons33)\
**Post date:** [April 2, 2023, 10:23pm UTC](https://forum.codewithmosh.com/t/fix-for-popper-css-margin-style-warning/19319/1 "2023-04-02T22:23:35Z")

</div>

Best I can tell the warning comes from popper.js library which is pulled in and used by Chakra in the Menu component. I found some references to the same issue from Bootstrap and React for menus and popover modals. Not sure why or if there is a going to be a fix to allow margin style but we can just use padding instead.

I removed the extra Box wrapper and put the two selectors back into a HStack. Here is the code I have working good now. BTW, ignore the handleFunctions. I’m just using separate functions instead of the inline arrow functions used in the course.

```auto
<GridItem area="main">
        <Box paddingLeft={2} paddingBottom={5}>
          <GameHeading gameQuery={gameQuery} />
          <HStack spacing={5}>
            <PlatformSelector
              onSelectPlatform={handleSelectPlatform}
              selectedPlatform={gameQuery.platform}
            />
            <SortSelector
              sortOrder={gameQuery.sortOrder}
              onOrderBy={handleOrderBy}
            />
          </HStack>
        </Box>
        <GameGrid gameQuery={gameQuery} />

```

---

<div class="post-metadata">

**Author:** ![jax](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@jax](https://forum.codewithmosh.com/u/jax)\
**Post date:** [July 9, 2023, 4:45pm UTC](https://forum.codewithmosh.com/t/fix-for-popper-css-margin-style-warning/19319/2 "2023-07-09T16:45:54Z")

</div>

Mosh has added a solution for this in the course now - it basically as above but using as the wrapping component.
