I have a bottom toolbar like this:
<div style="float:left;width:100%;position:fixed;z-index:210;bottom:5px;">
<div style="float:left;width:928px;border:1px solid #000;background:url('/images/noise-bg.jpg') repeat-x;height:26px;padding:5px;">
Toolbar Content
<div>
</div>
But this toolbar is aligned on left side of the page. I want this DIV to be in the center of the page. Means same space area on the both side(left and right) of the toolbar. I can’t fix the width of the toolbar, it is always 100%. I tried by setting fixed margin-left but it is different on different browsers/resolutions and iPad.
Any idea ?
Thanks
Your div has
width:100%andfloat:left, so it will be the same size of your page and you won’t be able to center.Set your width properly, remove that float and apply a
margin: 0 autorule on your div to center it.I made a jsbin to show that working:
http://jsbin.com/obepad/2/edit