Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Desmond Dallas
6,985 PointsAlign header centre - Try to align the header cente to page but just not happening. Where is the fault please??
<!DOCTYPE html>
<html lang="en">
<style> body {text-align:centre} </style>
<head>
<meta charset="UTF-8">
<title> Lesson 50</title>
</head>
<body>
<div style="border:4px solid black;width:100%;height:80px;background-color:#F78001;">
<h1 style="text-align:centre; font-family: sans-serif;font-size:40px;">Header</h1>
</div>
<div style="border:4px solid black;width: 100%;height:120px;background-color:#A5F94A;">
<h2 style="font-family: sans-serif;font-size:40px;">body</h2>
</div>
<div style="border:4px solid black;width: 100%;height:80px;background-color:#A2EBFF;">
<h3 style="font-family: sans-serif;font-size:40px">Footer</h3>
</div>
</body>
</html>
3 Answers
Desmond Dallas
6,985 Pointsyeeeeeeee haaaaaa
Thank you........
Margherita Alletto
1,963 PointsYou're welcome. Remember it's center and color. I had the same problem!
Desmond Dallas
6,985 Pointsthanks
Margherita Alletto
1,963 PointsMargherita Alletto
1,963 PointsYou're using the British spelling: use center instead and you should be fine.