Может быть, это поможет вам, если вы используете Xamarin.Forms:
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
...
Color.FromHex("#00FF00").ToUIColor();
Вам нужно определить ширину центрируемого элемента, а не родительского элемента.
#header ul {
margin: 0 auto;
width: 90%;
}
Изменить : Хорошо, я видел тестовую страницу, и вот как я думаю, вы хотите it:
#header ul {
list-style:none;
margin:0 auto;
width:90%;
}
/* Remove the float: left; property, it interferes with display: inline and
* causes problems. (float: left; makes the element implicitly a block-level
* element. It is still good to use display: inline on it to overcome a bug
* in IE6 and below that doubles horizontal margins for floated elements)
* The styles below is the full style for the list-items.
*/
#header ul li {
color:#CCCCCC;
display:inline;
font-size:20px;
padding-right:20px;
}
Почему бы и нет?
#header {
text-align: center;
}
#header ul {
display: inline;
}