Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

Why Is The Title Not Centered

The Website Is Completed And It Looks Fabulous Except For The Headers (They Seem To Be On The Left Side).

This Is The CSS

#title {
padding: 10px 0px;
 margin-left: auto;
 margin-right: auto;
text-align: center;
}

This Is The HTML

<!DOCTYPE HTML>

<html lang="en">
  <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <title>Dr. Maggie Wincher Music Ministries</title>
     <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
     <link rel="stylesheet" href="css/grid.css" type="text/css" media="screen">
     <link href='http://fonts.googleapis.com/css?family=Nunito' rel='stylesheet' type='text/css'>
     <link rel="stylesheet" href="css/style.css" type="text/css" media="screen"> 


 </head>
<body>
  <div class="container clearfix">    
        <p id="Dr. Maggie Wincher.html"></p><br>
      <div class="grid_12">
          <em><h1>Dr. Maggie Wincher Music Ministries</h1></em> 
      </div>

      <div class="grid_4">
          <img src="img/Dr. Maggie Wincher.jpg" alt="Dr. Maggie Wincher">
          <em><h4>Dr. Maggie Wincher</h4></em><br>
      </div>  


      <div class="grid_8 omega">
          <p cite="http://www.biblegateway.com/passage/?search=Psalm+68%3A4&amp;version=NIV">
          <em><h2><p>Sing to God, sing in praise of his name,
          extol him who rides on the clouds;
          rejoice before him—his name is the Lord. -Psalm 68:4</p></em></h2></p>

          <em><h3>My Mission</em></h3>
          <p>"The mission of Dr. Maggie Wincher Music Ministries is to aggressively fulfill the commission that Jesus Christ gave to His followers to go into the world and make disciples of all people. My purpose is to bring the lost to Jesus Christ and to build up and encourage those who are already believers."</p>
      </div>

2 Answers

Thanks :-)

Jacob Miller
Jacob Miller
12,466 Points

I don't see any element in your html with the id "title", so your CSS rule isn't doing anything. If you're trying to center your h1 and h2 elements, you can target those in CSS with simply h1 and h2. If you want to target only certain titles, give the ones you want to target a class and select that class in CSS.