Jump to content
Killersites Community
Sign in to follow this  
crocodilehun

CSS3 Foundations-Chapter 5-Lesson 4

Recommended Posts

Hi. I this lession you are talking about changing your UL buttons in the navigation bar so that they look like circles and then you set your list-style-type for them to "none".

based on that, i've tried to do this:

in structure-ch5.css add

ul li .navlist {
list-style-type: decimal;
line-height: 200%; }

and then i've tried to add this class in the <nav>:

<nav id="navigation">
    <h2>The Main navigation</h2>
    <ul class="navlist">
        <li><a href=#>Home</a></li>
        <li><a href=#>Store</a></li>
        <li><a href=#>Blog</a></li>
        <li><a href=#>Contact us</a></li>
    </ul>
</nav>

and it does not work, nothing happens. What am I doing wrong?

 

Thanks

Edited by crocodilehun
code style

Share this post


Link to post
Share on other sites

Just target the navlist ID in your CSS code. No need to specify the tags. Be sure to use the ID selector:

Quote

In the CSS, a class selector is a name preceded by a full stop (“.”) and an ID selector is a name preceded by a hash character (“#”). 

 

Share this post


Link to post
Share on other sites

Thanks, but... i've done this at the end of the stylesheet:

#navlist {
list-style-type: none;
line-height: 200%;
}

and then included it into .html file:

<ul id="navlist">
	<li><a href=#>Home</a></li> 
	<li><a href=#>Store</a></li>
	<li><a href=#>Blog</a></li> 
	<li><a href=#>Contact us</a></li> 
</ul>

and it still didn't changed the list style. i've even done this:

<ul style="list-style-type:none;">

didn't changed it either.

Share this post


Link to post
Share on other sites

an update.. i've done this:

#navigation ul li{
list-style-type: none;
line-height: 200%

and now it's working.

in the very next video you explained this for another purpose but i haven't seen in till now.

Thanks

Edited by crocodilehun

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×