Hi, my name is Craig im 33, I recently started learning web development and I have stumbled across a problem that I cant get past and wondered if anyone on WDF could help, Here goes. I am trying to create 2 unordered lists both to be styled into nav bars, (as I said im new to this so im sorry if im not explaining things in the right context) anyway I found a post on here that explained part of my problem but there is still another small issue. I will add some code to explain my problem.
#list01 ul {
list-style-type: none; <<<< When I add an id and define it in the style, everything works fine except the
margin: 0; #list01 ul, it only seems to be when I use the id on ul that I have a problem
padding: 0; its fine on the li, li a and li a:hover, does anyone know what im doing wrong?
overflow: hidden;
background-color: #333333; Thanks in advance.
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 16px;
text-decoration: none;
}
li a:hover {
background-color: #111111;
}
</style>
</head>
<body>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#about">About</a></li>
</ul>