Dipslay issue

Hi team, i want to center logo but i get the below error The browser says: The display: block property prevents align-items from having an effect. Try setting display to something other than block if you have any solution for this issue
No description
No description
No description
No description
12 Replies
clevermissfox
clevermissfox11mo ago
It’s saying align-items doesn’t work if it’s not a display: grid or display: flex. Put either on the parent of the icon and then you can justify -content and align items center to center your logo Gap also only works with flex and grid So you’ll want display flex on the bars-icon to center the fa-bars and then to center bars-icon within logo you can use flex, grid or use margin-inline: auto. If you need more help please post the relevant code into a codepen
gtyassine
gtyassineOP11mo ago
thanks for your help i want to share my code but my Codepen account is not working
gtyassine
gtyassineOP11mo ago
if you can check please
Mannix
Mannix11mo ago
it looks to me like it's working https://codepen.io/MannixMD/pen/rNRvEVq i would't trust those helpers in dev tools to much they are fairly new addition and i noticed false warning multiple times already 🙂
gtyassine
gtyassineOP11mo ago
yes it's working in the normal size
gtyassine
gtyassineOP11mo ago
No description
gtyassine
gtyassineOP11mo ago
but in the small size like phones is not in the middle here is the picture
gtyassine
gtyassineOP11mo ago
No description
Mannix
Mannix11mo ago
oh i see try adding to .search .container .logo in media query flex-grow:1 and in .search .logo-image also in media query margin-inline:auto;
gtyassine
gtyassineOP11mo ago
ok thanks i will tray it
gtyassine
gtyassineOP11mo ago
hello bro, thanks for you Help the provided code is working 100%
No description
Want results from more Discord servers?
Add your server