torsdag 22 april 2010

In English

(This blog entry is in English for coding-purposes and internationality)

I had a problem with my <ul> breaking out of my <p> tags.

The problem:

Having lists(ordered or unordered) nested inside paragraph tags is not a valid option since paragraphs only can contain inline-elements.


The solution:

Replace the paragraph tags with <div> tags using the same classes as the paragraph, e.g:

Replace:


<p class="paragraph">
<ul>
<li>Some text</li>
<li>More text</li>
</ul>
</p>


with:


<div class="paragraph">
<ul>
<li>Some text</li>
<li>More text</li>
</ul>
</div>


Comments and thoughts on this are more than welcome!

Inga kommentarer: