-3

I am using weebly and am a total noob to coding. but I very much would like to center my navigation menu bar text and bring along it's drop options with it?

Dallas
  • 1
  • Welcome to StackOverflow. Please show us what you have so far. SO is not a code writing service, and you will get a better response if you provide evidence of your own work. Please see [the Help pages](http://stackoverflow.com/help). – freefaller Jan 05 '15 at 10:14

1 Answers1

-1

CSS:

#container {
   margin: 0 auto;
   width: 1000px;
   text-align: center;
}

#menu {
   float: left;
   width: 100%;
}

HTML:

<div id="container">
    <div id="menu">
        <!-- here insert menu code -->
    </div>
</div>

http://jsfiddle.net/xgL5q727/

Menu generate here.

Mardzis
  • 760
  • 1
  • 8
  • 21
  • Why the float, why the width declaration in the menu. – Bram Vanroy Jan 05 '15 at 10:19
  • This is **my** best way to avoid problems with others browsers and and simple in creating responsive websites. There are many similar solutions. – Mardzis Jan 05 '15 at 10:29
  • No matter if it's "your" best solution. I am simply asking you why #menu is even necessary? I don't understand your use of HTML embedding and CSS. Why would you apply text-align center on the container, why not on the menu? Why would you need to float the menu? And width 100% is not necessary as it's the default value of a div. – Bram Vanroy Jan 05 '15 at 10:39