Hello all,
I know it's an discussed question,
and I followed this:
http://archivist.incutio.com/viewlist/css-discuss/105996?highlight=center+align
and the example from css.maxdesign
http://css.maxdesign.com.au/listamatic/horizontal16.htm

but I think it's not really center aligned.
I applied the text-align:center to ul but found actually it's a little bit
right shifted.

especially when I change #theControl 's width smaller , for example 300px.
then you will see that the left space is larger than the right space.

am I missing something important?

thanks a lot for any help!

ayrtbh


here is my html and css:

<!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>testPage</title>

<!---->
<style type="text/css">
#theControl {
margin:0 auto 0 auto;
        width:300px;
background-color:#CCCCCC;
}
#theControl ul {
text-align:center;
background-color:#cccccc;
}
#theControl ul li {
display:inline;
list-style-type:none;
}
#theControl ul li a {
margin-left:4em;
text-decoration:none;
color:#000000;
}
/**/
</style>
<!---->
</head>
<body>
<div id="theControl">
  <ul>
    <li><a href="#">asdf</a></li>
    <li><a href="#">ghjk</a></li>
  </ul>
</div>
</body>
</html>
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to