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

I can´t understand why my webpage does not appears in the middle of the browser, I´ve tried several things and nothing.

It was align at first, I didn´t change anything apart of the content of the paragraphs, I refreshed the page and everything was align to the left.

Thanks!

body {
  font-family: Helvetica, Arial;
  font-size: 27px;
  margin: 0 auto;
  max-width: 960px;
  padding: 40px 10px;
  line-height: 1.65em;
  background: #C14242;
  color: #fff;
  font-weight: 300; 
}

.logo{
  width: 100%;
}

.logo img {
  margin: 0 auto;
  display: block;
  width:50%;
}

.description {
  margin: 80px auto 40px;
  text-align: center;
}

.bucket {
  width: 100%;
  margin-bottom: 40px;
  display: inline-block;
}

.choice-bucket {
  width: 33.333333%;
  float: left;
  display: inline-block;
  margin: 0;
  padding: 0;
}

.choice-bucket input {
    font-size: 18px;
    margin: 15px 4%;
    padding: 16px 0;
    width: 92%;
    color: #BB475C;
    border-radius: 6px;
    border: 0;
    outline: 0;
    text-indent: 20px;
}

.highlight {
  font-size: 18px;
  margin-left: 30px;
  opacity: .8;
  line-height: 24px;
}

#answers {
    /* opacity: 0; */
    margin: 60px 0;
    background: #fff;
    border-radius: 6px;
    color: #BB475C;
    transition: 1s linear;
    overflow: hidden; /* add this */
}

#answers p {
  max-width: 760px;
  margin: auto;
  padding: 80px 0;
}

#answers p span {
  font-weight: bold;
}

form input[type=submit] {
    background: #B5D269;
    border: 0;
    color: #fff;
    font-size: 20px;
    padding: 1em 2em;
    cursor: pointer;
    margin: 0 auto 60px;
    display: block;
    text-align: center;
    border-radius: 6px;
    font-weight: bold;
}

.hide {
  opacity: 0;
  height: 0;
}

.show {
  opacity: 1;
  height: 100%;
}

Moderator edited: markdown was added to the question to properly render the code. Please see the Markdown Cheatsheet link at the bottom of the "Add an Answer" section for tips on how to post code to the Community.

1 Answer

can you share html code for better understanding about your problem