
Originally Posted by
toplisek
Is there some solution that there will be not <li class="link">
Sorry, but that makes no sense. Could you please rephrase the question?
If I have in code above class with css script, it will give me space at the top and bottom.
How to avoid this space?
Remove the margin applied to the list (ul) element. You may also need to alter the margin for other block-level elements around it, such as the paragraph.
I start tend to style sheets with:
Code:
body, body * {
font: 100%/1.2 sans-serif;
margin: 0;
padding: 0;
}
This resets the margins, padding, font styles and line-height for all elements. I can then reapply them in the way that would be most suitable.
<p>
<!-- ... -->
<ul class="link"><li class="link"><a href="mailto:mail1@mail.com">jmail1@mail.com</a></li></ul>
</p>
This is invalid, and doesn't do what you think it does. It is, in fact, equivalent to:
HTML Code:
<p>
<!-- ... -->
</p>
<ul class="link"><!-- ... --></ul>
</p>
Notice the extra end-tag before the list. Paragraphs cannot contain other block-level elements, only in-line elements. Encountering a block-level element implies the end of the paragraph. The second end-tag is obviously then invalid as there's no matching start-tag.
It gives me an error when I validated:
Quoting the actual error message, not the explanatory text that follows, is more useful (for me, anyway). However, a link to the document in question is better still as the cause of the error may be in a different place than you think.
If correcting the paragraph doesn't help, please post a link.
Bookmarks