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 trial

CSS CSS Layout Basics Positioning Page Content Fixed Positioning

Godfrey M
PLUS
Godfrey M
Courses Plus Student 2,696 Points

why i am un able to position my sections in the container of the body element??

i am getting problems positioning or floating sections or articles side by side. i've used the float property to place elements left and right ,assigned correct width to both sections the left and right as well as considering the margin and padding width, i've also tried to use the clearfix property but the my articles did not occupy well the full width of the container element. so am getting bored coz there is no easy way out ...<!DOCTYPE.html> <html lang="eng"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, inital-scale=1.0"> <title>mega website</title> <link rel="stylesheet" href="css/normalize.css" type="text.css"> <link rel="stylesheet" href="css/style.css"> <link href="https://fonts.googleapis.com/css?family=Aclonica|Acme|Aguafina+Script|Amita|Audiowide|Caesar+Dressing|Ewert|Galada|Great+Vibes" rel="stylesheet"> <link rel="shortcut icon" type="image/png" href="images/508372530.jpg">

</head> 

<body> 
    <div class="wrapper">

      <header class="main-header">
      <section class="top-header"><img src="images/my pic.png" width="" title="uganda flag"><h1> WORLD INDEPENDANCE SINCE 1900</h1></section>

     <div class="nav"> 
        <ul>
          <li><a href="index.html">home</a></li>
          <li><a href="contact us.html">contact us</a>
          </li>
          <li><a href="catering services.html">oman ODC</a>
          </li>
          <li><a href="blog.html">facebook</a>
          </li>
          <li><a href="contact us.html">intangram</a>

          <li><a href="catering services.html">whatsapp</a> 
          </li>
        </ul><br><br>

    </div>
    </header>
    <div class="main-content group">
    <div class="primary-col">

        <h3><span >What is Lorem Ipsum?</span></h3>

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

<h3>Why do we use it?</h3> It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>

</div><br> <div class="secondary-col "> <h3>Where does it come from?</h3> Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p> <h3>Where can I get some?</h3> <p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</p> </div> <div class="tiatiary-col"> <h3>Why do we use it?</h3> It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>

</div> <footer class="footer">

<div class="copy">Copyright © 2014 Bur Al Hickman, All Rights Reserved.</div> <div class="designed">Designed by <a href="http://www.almeka.net/" target="_blank">Godfrey</a>

 </div>

</footer >

<div class="clear"></div>

</div> <!-- wrapper - end -->

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="js/jquery.min.js"></script>

</body> </html>

...

Godfrey M
Godfrey M
Courses Plus Student 2,696 Points

style.css

*{ margin:0; padding:0; } body{ height:100%; width:100%; font-family: great-vibes; line-height: 1.3; background-image: radial-gradient( circle , #fff ,#FAEB01,#DF0F2B );

}

.top-header{

border-size:border-box;

} .main-header{

width:100%;
background-color: inherit;
z-index: 1;

}

img{ max-width: 100%; float:left; height:80px; width:80px; border-radius:100%; padding-left:15px;

}

ul{ margin: 0; padding: 0; } .nav{

height:60px;
background-color:#000;
opacity: .9;
margin-right: 0 auto;
border-radius: 30px;

}

.nav ul li{

width:190px;
float:left;
padding-right: 5px;
margin-right: 0 auto;
list-style: none;
padding-top: 20px;
opacity:.9;

margin-right:2;
font-family: aguafina-script;
font-weight: bold;

}

.nav ul li a{ display: block; text-decoration: none; text-align: center; text-transform: uppercase; color: #fff; margin-right: 0 auto;

}

} ul li a:hover { background-color: green; display:block; }

h1{ font-family: audiowide; line-height: 80px; float:center; color:#000; font-weight:bolder; font-size:50px; padding-top: 10px; padding-left: 30px; letter-spacing: 0px; text-shadow:5px 0px 5px #fff;

}

div.main-content{

width:90%;
margin:0 auto ; 
padding-right:0;
background-color:  ;
box-sizing: border-box;
border: 2px double green;

}

.primary-col{ width:30%; float: left; padding:0; margin-right: 10px;

}

.secondary { width: 30%; height: 270px; float: right; vertical-align: top; padding-top:-10px; border: 2px solid blue; line-height: 1.1; font size: .8em; border: 2px double green;

} .tiatiary-col{ width:20%; float: right; }

footer{ background-color: grey; height: 40px; text-align: center; font-size: 16px; width:100%; z-index:5;

} .group:after { content: ""; display: table; clear: both;