I was having a trouble of getting ul markers to fall inside the margin. I fixed it by changing
#contents ul {
border:solid;
font-size:85%;
margin-left: 0px;
padding-left: 2.5em;
max-width: inherit;
list-style-position: inside;
}
to
ul {
/* rules */
}
Even though the ul in question is given the id of ‘contents’ it seems the rules only get passed down to its children? Or is there another reason for this mishap? I’d like to be able to limit the ul ruleset to the ‘contents’ id if possible.
With
You’re saying any
<ul>that is a descendent of and element withid="contents"should be applied the styles. But you say you haveso you can do
Though this shouldn’t be necessary to qualify the selector with an element;
#contentsalone should be enough.If you want both the
<ul>withid="contents"and it’s descendents, you can do