We help IT Professionals succeed at work.

Another Unordered List (UL) CSS Question

erzoolander
erzoolander asked
on
Medium Priority
275 Views
Last Modified: 2012-06-21
I have an unordered list with items that need to be formatted as follows:


Item Year                        Item Name                                      Item Price
Item 2 Year                     Item 2 Name                                   Item 2 Price
Item 3 Year                     Item 3 Name                                   Item 3 Price

...and so on.

Basically - it's kind of like there was a table - with 3 columns...but instead of using a table it's using a UL with LI tags.

How would you create that in CSS?
Comment
Watch Question

Greg AlexanderLead Developer

Commented:
Something like this:
<style>
#unorder li{
	list-style:none;
}

#unorder .cells{
	float:left;
	min-width:200px;
}

#unorder .break{
	clear:both;
}
</style>
<ul id="unorder">
	<li class="cells">Item Year</li>
    <li class="cells">Item Name</li>
    <li class="cells">Item Price</li>
    <li class="break"></li>
    <li class="cells">Item 1 Year</li>
    <li class="cells">Item 1 Name</li>
    <li class="cells">Item 1 Price</li>
    <li class="break"></li>
    <li class="cells">Item 2 Year</li>
    <li class="cells">Item 2 Name</li>
    <li class="cells">Item 2 Price</li>
    
</ul>

Open in new window

Senior Web Developer
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.