user544079
user544079

Reputation: 16629

List is not inheriting style of outer div's CSS

I have a list inside a div. The div is styled as

<div id="container">
Random text
<ul>
   <li>Text</li>
</ul>
<div>

#container{
//styling information
}

However, the list is not following the style of the container. How can I fix this?

Upvotes: 0

Views: 330

Answers (1)

Aeonius
Aeonius

Reputation: 1073

Try

#container ul{
//styling information
}

to style the list and

#container li{
//styling information
}

to style the items

Upvotes: 2

Related Questions