?
Solved

Centering elements in li tags

Posted on 2014-09-08
2
Medium Priority
?
105 Views
Last Modified: 2014-09-08
Hello experts
I have list of elements and i use this for "steps" function.
I need help to center the I, II, III, a.s.o. in the list too.
Any help?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>
      Untitled Document
    </title>
    <style type="text/css">
	#steps{ list-style:none; width:100%; overflow:hidden; margin:0px; padding:0px;}
    #steps li {font-size:22px; float:left; padding:10px; color:#b0b1b3;}
    #steps li.first {float:left; padding-left:0px !important; color:#b0b1b3;}
    #steps li span {display:block;font-size:14px;}
    #steps li.current { color:#8F7861;}
	</style>
  </head>
  
  <body>
    <ul id="steps">
      <li class="first" id="stepDesc1">
        &nbsp;I
        <span>
          Blablablabla
        </span>
      </li>
      <li class="" id="stepDesc2">
        &nbsp;II
        <span>
          Blablablabla
        </span>
      </li>
      <li class="" id="stepDesc3">
        &nbsp;III
        <span>
          Blablablabla
        </span>
      </li>
      <li class="current" id="stepDesc4">
        &nbsp;IV
        <span>
          Blablaa
        </span>
      </li>
      <li class="" id="stepDesc5">
        &nbsp;V
        <span>
          Blablablabla
        </span>
      </li>
      <li class="" id="stepDesc6">
        &nbsp;VI
        <span>
         Blablablablabla
        </span>
      </li>
    </ul>
  </body>
</html>

Open in new window

0
Comment
Question by:Panos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 40310486
#steps li {
    ...
    ...
    text-align: center;
}

Open in new window

0
 
LVL 2

Author Comment

by:Panos
ID: 40310521
Hi Gary
Thank you for your help.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Suggested Courses

800 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