0
Center border
How do I center the cyan border within the border https://code.sololearn.com/W4AYgJ5S4eka/?ref=app
7 Réponses
0
Just put "width:auto" for the H1:
https://code.sololearn.com/Wimcbstp2k5t/?ref=app
0
Add : align="center" in your <h1> tag.
0
<b> tag?
0
Oups your <h1> tag...
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?
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>
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.