View Single Post
Old 06-23-2009, 03:48 PM   #7 (permalink)
Runar
The Contributor
 
Runar's Avatar
 
Join Date: Nov 2008
Location: Norway
Posts: 58
Thanks: 20
Runar is on a distinguished road
Default

Your elements may have the same features, but they are still not exactly the same. I am not sure if you can use the same function to toggle a div container and a child element of that div.

jQuery is not my best field either, so I will have to pass it on to someone else. Instead, I will give you a few more tips when it comes to HTML:

If you want to display a list, use the list element. It comes in two variations: ul (unordered lists) and ol (ordered lists). The main list element (ul or ol) works as a container, with several child elements (li) inside.

Your code would for example look like this:

HTML Code:
<ul id="resinfo" class="p">
	<li><strong>Type:</strong> Friendly</li>
	<li><strong>Venue:</strong> Home</li>
	<li><strong>Kick-Off:</strong> 10:30</li>
	<li><strong>Score:</strong> 3 - 2</li>
</ul>
Read more about lists here: http://htmldog.com/guides/htmlbeginner/lists/

Also, if you wish to apply more than one class to an element, simply enter the classes inside the same attribute:

HTML Code:
<h1 class="first-class second-class">Lorem ipsum</h1>
HTML Dog is a great place to learn the basics of HTML and CSS, and how they work together.


Yours, Runar
Send a message via MSN to Runar
Runar is offline  
Reply With Quote