lundi 8 février 2016

Ruby on Rails CSS File

I am creating a website with ruby on rails but my css isn't going so great . I have a application.css file in my public/stylesheets file . The way I want the words to show up on the screen it's working but the colors I want to show isn't .

home.html.erb :

<!DOCTYPE html>
<html>
<body bgcolor="#E6E6FA">    
<center><h1>AucIt</h1></center>

<nav>   
  <ul>
   <li style="font-size: 20px"><a href="#">Sign Up</a></li>
   <li style="font-size:20px"><a href="#">Login</a></li>
   <li style="font-size:20px"><a href="#">List</a></li>

</ul>

</nav>

<h2>Most recent:</h2>

</body>
</html>

application.html.erb:

<!DOCTYPE html>
<html>
<head>
 <title>AucIt</title>
 <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
 <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body>

<%= yield %>

</body>
</html>

application.css:

nav {
background-color: orange;
height: 9px;
width: 1272px;
padding-bottom: 50px;
}
nav ul li {
list-style-type: none;
width: 150px;
float: right;
border-right: 1px solid #CCC;
text-align: center;
}
li a {
text-decoration: none;
color: blue;
line-height: 60px;
display:block;
}
li a:hover {
background-color: gray;
color: black;
}
h2{
padding-top: 280px;

}

Aucun commentaire:

Enregistrer un commentaire