I need to know how to center my horizontal menu bar in Dreamweaver. Detailed instructions, and html code if needed, would be greatly appreciated. Thanks!
in the "Design View" you can right click on the horizontal menu bar that you implemented and click align->center. Dreamweaver will add a div around your code like this:
<div align="center">
…code
</div>
if that doesn’t work you can try this CSS code:
<div style="margin:0 auto;">
…code…
</div>
this css style should automatically set the right and left margins to be the same (meaning the menu is in the center of the page.)
If it is still slightly to the left add:
<div style="margin:0 auto; padding-left:10(or the amount it is off in pixels)px">
…code…
</div>
No TweetBacks yet. (Be the first to Tweet this post)
August 30th, 2009 at 8:49 pm
in the "Design View" you can right click on the horizontal menu bar that you implemented and click align->center. Dreamweaver will add a div around your code like this:
<div align="center">
…code
</div>
if that doesn’t work you can try this CSS code:
<div style="margin:0 auto;">
…code…
</div>
this css style should automatically set the right and left margins to be the same (meaning the menu is in the center of the page.)
If it is still slightly to the left add:
<div style="margin:0 auto; padding-left:10(or the amount it is off in pixels)px">
…code…
</div>
References :