I have the following css:
#app-info { float: left; margin: 10px 10px; }
#app-info ul { list-style-type:none; display:block; }
#app-info ul li { padding:2px 0; }
#content { width:650px; float:left; }
#content ul { padding-left: 40px; padding-bottom: 15px; }
#content ul li { padding:5px 0; }
Then I have the code:
<div id="content">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
<div id="app-info">
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
</ul>
</div>
</div>
The issue i’m having is that the inner list is being formatted by the content id, however I don’t want this. I only want the app-info class to format it. How can I achieve this?
You can use Child Selector
'>'instead of Descendant Selector' '.