Ryan Moore wrote:
Looking to Center Text on an unordered list.
css:
ul
{text-align: center;}
li
{
display: inline;
list-style-type: none;
padding-right: 20px;
}
markup:
Item one
Item two
Item three
Item four
Item five
Best,
~dL
--
http://chelseacreekstudio.com/
***
If I understand correctly, you might be searching for something like this:
ul
{
text-align: center; /* align text in element */
list-style:none; /* remove any list entry symbol */
}
li
{
font-weight:bold;
display:inline; /* show all three items in a single row */
}
Hope this helps.
Ryan Moore
yes it's good, i like the float:left better than display:inline.
On 7/25/07, Ryan Lin <[EMAIL PROTECTED]> wrote:
Hi there,
ul { display:block; width:100%; text-align:center; list-style:none}
ul li {float:left; margin-right:5px}
These two styles should get you this.
Did I do it correct? Commen
I think the easiest way I can think of is this:
ul {
display: block;
width:100%;
text-align:center;
}
li {
display:inline;
font-weight:bold;
}
On 7/25/07, Ryan Moore <[EMAIL PROTECTED]> wrote:
Looking to Center Text on an unordered list.
Example:
Link 1
Link 2
Link 3
De
Hi there,
ul { display:block; width:100%; text-align:center; list-style:none}
ul li {float:left; margin-right:5px}
These two styles should get you this.
Did I do it correct? Comments?
Ryan Moore wrote:
Looking to Center Text on an unordered list.
Example:
Link 1
Link 2
Link 3
Desired Eff
> The first one is better as you are not taking the box out of
> the flow of
> the page. Using top and left with absolute positioning will
> do this... For example if you had a fixed block to align
> center, then doing the
> margins with top and left is difficult as you don't know the width o
The first one is better as you are not taking the box out of the flow of
the page. Using top and left with absolute positioning will do this...
For example if you had a fixed block to align center, then doing the
margins with top and left is difficult as you don't know the width of
the viewport.
The first example you gave is designed to work for any situation. It works
for items that have fixed widths or liquid widths (based on the width of the
viewport). And yes, it is not as elegant as it should be.
However, if you have a liquid layout, there is a much simpler method that
only needs two
Hey Taco
The only problem with your method is that you have to set the left & right
positions to a fixed value (10%). I think setting margins on the body
(margin-left: 10%; margin-right: 10%;)would work in a similar way.
In some cases you don't care what the left & right margins look like you
ju