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 trialChristopher Ponce
2,766 Pointsmy nav its disabled
im gonna post the code i think its a float property but i kind of need it
Christopher Ponce
2,766 Pointsh1 {
margin: 0;
text-align: center;
}
body{
margin: 0 100px 0 0;
background-color:black;
}
p{
margin: 0;
color: blue;
}
header{
margin: 0 5px 0 0;
background-color: darkgreen;
}
#menu{
height:600px;
float: left;
background-color: cyan;
}
#menu.pos_top{
position: relative;
top:-19px;
}
#content{
margin: 0;
text-align:justify;
}
#content.pos_left{
position: relative;
left: 50px;
}
h1{
color: blue;
}
h1.pos_left{
position: relative;
left: 50px;
}
h3{
color: blue;
}
nav p {
text-align:center;
}
a {
text-decoration: none;
color: blue;
}
footer.pos_top{
position:relative;
top:420px;
}
#footer{
text-align: center;
color: blue;
}
li{
margin: 10px;
}
footer{
background-color: #ff6;
padding: 15px;
}
4 Answers
nvcxnvkldsjaklfds
Courses Plus Student 5,041 PointsCheck this one!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>introduction</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div id="header">
<header>
<h1 class="heading">C# Tutorial</h1>
</header>
</div>
<section>
<div id="menu" class="pos_top">
<nav>
<p>Navegacion</p>
<ul>
<li><a href="variables.html">Variables</a></li><br>
<li><a href="controlstructures.html">Control Structures</a></li><br>
<li><a href="loops.html">Loops </a></li>
</ul>
</nav>
</div> <!--menu DIV CLOSE -->
<!-- Content DIV OPEN-->
<div id="content">
<h3>Introduccion</h3>
<p>Bienvenidos al tutorial de C#. En este tutorial aprenderan a como se declaran variables, las estructuras de controles y<br> tambien conoseran los loops. Pero primero deberan aprender y entender lo que es C#.</p>
<p><br>¿Que es C#?<br>C# es un lenguaje de programación que se ha diseñado para compilar diversas aplicaciones que se ejecutan en .NET Framework. C# es simple, eficaz, con seguridad de tipos y orientado a objetos. <br>Las numerosas innovaciones de C# permiten desarrollar aplicaciones rápidamente y mantener la expresividad y elegancia de los lenguajes de estilo de C.</p>
</div><!-- Content DIV CLOSE-->
</section> <!-- SECTION CLOSE-->
<div id="footer">
<footer class="pos_top">
<h2>©2014 Christopher Ponce</h2>
</footer>
</div>
</body>
</html>
.heading{
width: 80%;
margin: 0 auto;
text-align: center;
border: 2px solid;
}
#menu{
width: 20%;
float: left;
background-color: cyan;
}
nav p{
text-align: center;
}
#content{
margin-right: 30px;
background-color: blue;
}
nav ul li{
margin-left: 30%;
}
#content{
float: right;
width: 77%;
}
#footer{
clear: both;
border: 2px solid;
text-align: center;
}
nvcxnvkldsjaklfds
Courses Plus Student 5,041 PointsYou'll need to remember that you cannot apply both positioning and a float to an element, because it does create conflicting positioning schemes and disable the navigation links.
I do not understand why you have both ID and class for almost all elements. It is no point having both ID and class. Since both points to the same block of elements.
You should remove all duplicate selectors from CSS and HTML to work this one properly.
Christopher Ponce
2,766 Pointswow thanks alot i was trying to clean my code but thanks ill take example from it
nvcxnvkldsjaklfds
Courses Plus Student 5,041 PointsThis CSS may be useful. Try this!
.heading{
width: 80%;
margin: 0 auto;
text-align: center;
border: 2px solid;
}
#menu{
width: 20%;
float: left;
}
nav p{
text-align: center;
font-weight: bold;
}
#content{
margin-right: 30px;
}
nav ul li{
margin-left: 30%;
}
#content{
width: 70%;
float: left;
}
#footer{
clear: both;
border: 2px solid;
text-align: center;
}
Christopher Ponce
2,766 PointsChristopher Ponce
2,766 Points