0

Center border

How do I center the cyan border within the border https://code.sololearn.com/W4AYgJ5S4eka/?ref=app

25th Mar 2019, 5:13 PM
Pierson
Pierson - avatar
7 Réponses
0
Just put "width:auto" for the H1: https://code.sololearn.com/Wimcbstp2k5t/?ref=app
25th Mar 2019, 9:29 PM
Jorge
Jorge - avatar
0
Add : align="center" in your <h1> tag.
25th Mar 2019, 5:18 PM
Samuel STEF
Samuel STEF - avatar
0
<b> tag?
25th Mar 2019, 5:21 PM
Pierson
Pierson - avatar
0
Oups your <h1> tag...
25th Mar 2019, 5:21 PM
Samuel STEF
Samuel STEF - avatar
0
I'm pretty sure that my text-align: center; in my body css does the same thing, but after adding the align="center" nothing changed, did I do something wrong?
25th Mar 2019, 5:25 PM
Pierson
Pierson - avatar
0
Test this: <!DOCTYPE html> <html> <head> <title>blwhpenguin's Home Page</title> <style> body { padding: 20px; border: 10px groove red; background-color: black; text-align: center; color: red; border: 10px dashed cyan; } </style> </head> <body> <h2 align="center">blwhpenguin's Home Page</h2> </body> </html>
25th Mar 2019, 5:28 PM
Samuel STEF
Samuel STEF - avatar
0
Your width is more tall than the page can support and you have à scroll. With this the page is small than before and your text is center.
25th Mar 2019, 5:29 PM
Samuel STEF
Samuel STEF - avatar