[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Unordered List (UL) CSS question

Posted on 2011-04-23
3
Medium Priority
?
288 Views
Last Modified: 2012-05-11
Hey -

Our front end developer is coming up a little short right now - and I'm more of a backend guy...knowing enough about CSS to be dangerous - but in no way proficient.  So - maybe this is a stupid question - but 500 points to whoever can give me the best answer.  :)

We have an unordered list (UL) set.

Inside of that list - I want each list item to look like this.

Item                                                              Price

On the same line - with "Price" right justified.

What would the CSS be to accomplish that?

Thanks in advance!
0
Comment
Question by:erzoolander
  • 2
3 Comments
 
LVL 38

Expert Comment

by:Tom Beck
ID: 35453259
<ul style="list-style:none;width:400px;">
        <li style="float:left;">Item</li>
        <li style="float:right;">Price</li>
    </ul>
0
 
LVL 38

Accepted Solution

by:
Tom Beck earned 2000 total points
ID: 35453285
Same thing using style sheet instead of inline:

Style Sheet:

    ul {list-style:none;width:400px;}
    .right {float:right;}
    .left {float:left;}

HTML:

    <ul>
        <li class="left">Item</li>
        <li class="right">Price</li>
    </ul>
0
 
LVL 2

Author Closing Comment

by:erzoolander
ID: 35457525
Thank you!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question