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

Matthew Murphy
Matthew Murphy
218 Points

CSS ID Selector and DIV Question

Hello, Is my CSS Code correct? I am having trouble getting the menubar to connect in CSS.

div#menubar {
    border: 10px solid darkblue;
<body>
    <header id=top>Welcome!</header>
    <div id="menubar">
        <a href="Home">Home</a>
        <a href="About Us">About Us</a>

    </div>

If you are using workspaces can you post a snapshot? It is the camera icon in the upper right corner.

1 Answer

remove the "div" part here, keep the hashtag, make sure you add a closing bracket too:

div#menubar {
    border: 10px solid darkblue;

it should look like this:

#menubar {
    border: 10px solid darkblue;
}

Also, your header id will need parentheses around it too.

Like this:

    <header id="top">Welcome!</header>
Matthew Murphy
Matthew Murphy
218 Points

Thank you for your answer. But how come it connects still using the selector I provided? It just doesn't look right.