Click here to Skip to main content
15,881,898 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Does anyone know why the "Sign In" won't position itself as the other words? Also the white line is not showing as on the other words.

Anyhow, here is the coding.

HTML

HTML
<html>
<head>
<link rel="stylesheet" type="text/css" href="ep.css">

</head>

<body>

<nav id="nav-1">
  <a class="link-1" href="#">logo</a>
  <a class="link-1" href="#">Buy</a>
  <a class="link-1" href="#">Rent</a>
  <a class="link-1" href="#">Mortgage</a>
  <a class="link-1" href="#">Moving</a>
  <a class="link-1" href="#">News</a>
  <a class="link-2" href="#"> Sign In</a>
</nav>
<img src="images/si.jpg" alt="Mountain View">




</body>
</html>



CSS

CSS
@import url(http://fonts.googleapis.com/css?family=Raleway);
body {
  margin: 0px;
}
nav {
  margin-top: 0px;
  padding: 20px;
  text-align: left;
  font-family: Raleway;
  
}
#nav-1 {
  background: #6CC204;
}


.link-1 {
  transition: 0.3s ease;
  background: #6CC204;
  color: #ffffff;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 0px solid #6CC204;
  padding: 20px 0;
  margin: 0 20px;
}
.link-1:hover {
  border-bottom: 4px solid #ffffff;
  padding: 6px 0; 
}

.link-2 {
  transition: 0.3s ease;
  background: #6CC204;
  color: #ffffff; 
  font-size: 16px;
  text-decoration: none;
  border-bottom: 0px solid #6CC204;
  padding: 20px 0;
  margin: 0 20px;
  left:1430px;
  position:absolute;
  
}
.link-2:hover {
  border-bottom: 4px solid #ffffff;
  padding: 6px 0px; 
}


img {
    position: absolute;
    left: 1400px;
    top: 20px;
   
}
Posted
Updated 1-Jan-16 12:42pm
v2

1 solution

Change it to...
HTML
<a class="link-1" href="#"> Sign In</a>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900