[thelist] css newbie question
Dave Holloway
daveholloway at spamcop.net
Mon Jan 26 14:05:14 CST 2004
walker wrote:
> How do I keep the two separate?
Hey Walker.
Say you have a list like this..
<ul>
<li>Blah</li>
<li>Blah</li>
<li>Blah</li>
</ul>
wrap it in a DIV tag like this and give the DIV a meaningful ID.
<div id="fred">
<ul>
<li>Blah</li>
<li>Blah</li>
<li>Blah</li>
</ul>
</div>
then in your css you would probably have something like this:
ul {list-style:none;margin:0;padding:0; etc....}
li {color:red.. etc etc...}
Modify the lines of CSS to look like this:
#fred ul {list-style:none;margin:0;padding:0; etc....}
#fred li {color:red.. etc etc...}
This will restrict the CSS so that it only applies specifically to UL
and LI elements with are inside a DIV with an ID of "fred".
Hope this helped
Little Dave
http://www.daveholloway.co.uk
More information about the thelist
mailing list