Log in

View Full Version : How to define bullet image and code to defined div element?



toplisek
04-16-2007, 01:39 PM
I have code like




#mainctnR{
width: 555px;
border-left: 1px dotted #CCCCCC;
margin-left: 174px;
text-align: left;
padding-top: 5px;
padding-right: 0px;
padding-left: 10px;
padding-bottom: 15px;

}


there is also define ul and bullet list like




ul { list-style-type:none; margin:0px; padding:0px }
li {
background: transparent url(index_files/bullet1.gif) no-repeat 0% 0%;
padding-left:15px;
margin-top:7px;
line-height:10px;
}

How to define name for this ul that it will be within div?

nwalton
04-17-2007, 05:37 PM
You can select specific elements, and elements within elements in CSS like this:


div#mainctnR ul {
...
}

div#mainctnR ul li {
...
}


Using selectors this way will only format the <ul> and <li> elements that fall within a <div> that has the #mainctnR id. Is this what you're looking for?