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

Review of my HTML and CSS code

I would like to hear comment about my code, to see am I on good way to learn HTML and CSS, is my code good etc.

Please tell me how to center links on <section> and am I using correct margin, padding, width, float properties correct.

Thanks in advance! :)

6 Answers

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>links</title>
    <link rel="stylesheet" href="css/style.css" media="screen" title="no title" charset="utf-8">
  </head>
  <body>
    <div class="wrapper">
      <a href="#" class="callout">This is a link centered</a>
    </div>
  </body>
</html>
.wrapper {
  width: 100%;
  text-align: center;
}

that's a basic example of how you can center an inline link. But you didnt post your code.

yes. you should give your wrapper a text align center property and not the actual link.

Sorry I forgot, here is my code https://w.trhou.se/5a8n6mwdcc

Please focus on two columns in section, after wildlife div.

When you remove margins or change it, they aren't inline. I try with display properties but nothing change.

You see I manually add px until I found good size.

ok here is the code https://w.trhou.se/qzs96knq68. i deleted the section div since you didnt need it. next i added a div to contain the two floated columns. you didnt wrapped them in a div so the floated columns where actually float in outer space :). i contain them in a div, plus i added some clearfix technique there. and i finally centered your links. Check the code. Hope i helped you Srdjan Cestic

That really help, but I solve my problem and everything looks perfectly fine, here is my workspace https://w.trhou.se/qygfzjlge8

Is my code ok?

Thanks again for helping.