Michael Brunel Posted April 29, 2019 Share Posted April 29, 2019 (edited) Bonjour, J'aimerais arriver à centrer la barre de recherche, quelque soit la taille de l'écran (je travaille sur 13" et j'ai aussi un grand écran 27"). Si c'est centré sur l'un grâce à la position absolute, l'autre ne l'est pas... Et pourtant je mets du positionnement en proportionnel (en em ou %...) Quelqu'un peut m'aider ? Merci beaucoup 🙏 Edited November 4, 2020 by Michael Brunel resolu (see edit history) Link to comment Share on other sites More sharing options...
Eolia Posted April 29, 2019 Share Posted April 29, 2019 #somelement { position: absolute; left: 50%; -webkit-transform: translateX(-50%); transform: translateX(-50%) } ou #somelement { position: absolute; left: 0; right: 0; margin: auto } Link to comment Share on other sites More sharing options...
Michael Brunel Posted April 30, 2019 Author Share Posted April 30, 2019 Merci ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now