Lets start by styling the navigation bar: Build your own website( CSS styling)


#1

It keeps saying "Set the color of the a elements inside

..
to #5a5a5a" when it already is set to exactly this. This is making a website at 90% finished. Can anyone figure this out?

#2

also, how do i post the code without just copy and pasting the link?


#3

You can just copy css code to the forum, for html copy it to the forum, and use one of the following two methods to make it visible:

select your code and press ctrl + shift + c (or cmd + shift + c if you use a mac)

if this instructions are unclear, you can also insert 3 backticks before and after your code, like so:

```
<p>visible</p>
```

the backtick is located above the tab key on your keyboard

You can also use these instructions for css, if you want it to keep the indention.


#4

<div class="nav"> .nav a {color: #5a5a5a; font-size: 11px; font-weight: bold; padding-bottom: 14px; padding-left: 10px; padding-right: 10px; padding-top: 14px; text-transform: uppercase; } </div>

#5

is this enough information?


#6

I am confused, i see html code nested in css code, this is not possible, you have your nav in index.html, then in (what is the stylesheet called) main.css you need to write your css syntax


#7

whats my css syntax? and what do you mean by you see html code nested in css code? i have it set in main.css which is where it tells me to write it.


#8

That's correct, however this line

<div class="nav"> <!--HTML Code-->
   .nav a {color: #5a5a5a; <!--CSS Code-->
           font-size: 11px; <!--CSS Code-->
           font-weight: bold;  <!--CSS Code-->
           padding-bottom: 14px; <!--CSS Code-->
           padding-left: 10px; <!--CSS Code-->
           padding-right: 10px; <!--CSS Code-->
           padding-top: 14px; <!--CSS Code-->
           text-transform: uppercase; <!--CSS Code-->
   } 
</div> <!--HTML Code-->

So when @stetim94 says you have CSS code wrapped in HTML code. That's what he means, you can't have <div> statements in your CSS tab, and you can't have .nav a (CSS Code) in your HTML tab.


#9

What @lolman says, that is what i mean. If you can't distinguish html and css code i recommend the html + css course before making a website course (i recommend that anyway), html + css gives you a basic understanding of html + css, which you need to build a webpage