html - Why is the text not working? -


i experimenting html/css. positioning h5 isn't working. when position it, top bar scoot down. should flush top of container. here's code.

    <!doctype html>     <html lang="en">         <head>             <meta charset="utf-8" />             <title>hello world!</title>             <link rel="stylesheet" href="css/main.css" type="text/css"/>             <script src="js/site.js"></script>         </head>         <body>             <!-- window wrapper -->             <div id="wrapper">                 <!-- top bar -->                 <div id="top_bar">                     <!-- title -->                     <h6 class="title">hello</h6>                 </div>             </div>         </body>     </html> 

now css.

    body {         font-family: "helvetica neue";         background: url("http://media.idownloadblog.com/wp-content/uploads/2014/06/yosemite-preview.jpg");         background-size: cover;         background-repeat: no-repeat;         background-attachment: fixed;         background-position: center center;     }      #wrapper {         height: 500px;         width: 1000px;         border: 1px solid black;         border-radius: 5px;         box-shadow: 5px 5px 10px gray;     }      #top_bar {         background: linear-gradient(rgba(220,220,220,0.8),rgba(225,225,225,0.8),rgba(215,215,215,0.8));         margin-top: 0px;         height: 50px;         width: 100%;         border-top-left-radius: 5px;         border-top-right-radius: 5px;         border-bottom: 1px solid black;     }      .title {         text-align: center;     } 

so please guys, don't know what's wrong.

p.s. don't mind background image.

try using this:

.title {         text-align: center;     margin-top:0px;     } 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -