+ 3

I want a this code in center can anyone help me ????

https://code.sololearn.com/Wc6bnZBNRl8K/?ref=app

24th May 2022, 11:20 AM
Alpesh Solanki
Alpesh Solanki - avatar
25 odpowiedzi
+ 9
HTML Give your main div a class. It can be any name you want but I choose center. <div class="center"> In your CSS tab or in your <style> element add this: .center{ margin:auto; } https://code.sololearn.com/WsxlOq6Td9Qx/?ref=app
24th May 2022, 10:28 PM
Chris Coder
Chris Coder - avatar
+ 7
Thank you so much Chris Coder
25th May 2022, 3:14 AM
Alpesh Solanki
Alpesh Solanki - avatar
+ 5
What exactly do you want to center? The div? Try to set div's margin to auto in order to center horizontally.
24th May 2022, 11:45 AM
Lisa
Lisa - avatar
+ 5
Read my reply carefully: WHAT EXACTLY DO YOU WANT TO CENTER?
24th May 2022, 11:56 AM
Lisa
Lisa - avatar
+ 4
The text already is centered horizontally. Do you want to center the text vertically? Or do you want to center the divs vertically or horizontally on the page? Please be precise.
24th May 2022, 12:02 PM
Lisa
Lisa - avatar
+ 2
Not working
24th May 2022, 11:55 AM
Alpesh Solanki
Alpesh Solanki - avatar
+ 2
Try <h1 align="center">example<h1>
25th May 2022, 6:16 PM
Duncan Kutya
+ 1
Can you do this for me
24th May 2022, 11:55 AM
Alpesh Solanki
Alpesh Solanki - avatar
+ 1
Yess I want to do center
24th May 2022, 11:58 AM
Alpesh Solanki
Alpesh Solanki - avatar
+ 1
WHAT do you want to center? WHICH ELEMENT?
24th May 2022, 11:58 AM
Lisa
Lisa - avatar
+ 1
The text of code
24th May 2022, 12:00 PM
Alpesh Solanki
Alpesh Solanki - avatar
+ 1
1 2 HOME Kind. kinder
24th May 2022, 12:00 PM
Alpesh Solanki
Alpesh Solanki - avatar
+ 1
This tutorial will teach you CSS https://www.sololearn.com/learning/1023
24th May 2022, 12:08 PM
SoloProg
SoloProg - avatar
+ 1
Vertical center i want
24th May 2022, 12:28 PM
Alpesh Solanki
Alpesh Solanki - avatar
+ 1
position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
24th May 2022, 8:47 PM
Junior
Junior - avatar
+ 1
please which app are you guy using to view your code
25th May 2022, 4:35 PM
Collins
Collins - avatar
+ 1
Hello brother thank you for your answer I can try if so how thank you in advance
26th May 2022, 8:52 AM
LASSANA CAMARA
0
body { text-align: center; } div { /*width: 300px; height: 300px;*/ background-color: aquamarine; }
24th May 2022, 12:01 PM
SoloProg
SoloProg - avatar
0
my ESfile explorer is not more working
25th May 2022, 4:35 PM
Collins
Collins - avatar
0
Bonjour tout le monde je suis nouveau ici français j'aimerais savoir si quelqu'un peux m'aider pour créer un profil chauffeur avec les options inscription localisation des véhicules localisation client merci pour votre réponse je possède déjà un module de réservation mais sans localisation merci
25th May 2022, 9:27 PM
LASSANA CAMARA