Bummer! You must be logged in to access this page.

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 Alignment

Hi there!

I am new to CSS. I am trying to center my logo on the top of the page. And then, put my links to the right of the logo. Right now, all I can do is center everything.

Here's is what it looks like right now: http://gogoboggo.com/index.php

(I have borders around everything that's why it looks funny!)

I'd like the layout to look more like this: http://ballardcontest.com/

But up above, I'd like the logo centered. But I'd like the links higher up, and then on the right side of the page, justified right too. Right now, it's all centered.

Any ideas?

Thank you very much! Andrea :)

2 Answers

Hi Andrea,

I had a look at your website and found the solution for your problem.

You need to remove some CSS from yours and add the following.

Remove your IMG.displayed rule and add the following:

IMG.displayed {
display: block;
position: absolute;
left: 50%;
margin-left: -80px;
}

Now remove your #top rule and add:

#top {
height: 162px;
color: #FFF;
overflow: hidden;
border-style: solid;
border-color: #F00;
border-width: 3px;
}

Vivek,

That was it! Your code fixed my issue. Thank you! I had been working on it for over two hours!!

:) Andrea

Hey Andrea if you can add this to your CSS ``` #top{ width:100%; position:relative;
}

menu{

position:absolute;
top:0;
right:20px;    

}```