How to Center a Drop-Down in HTML
When creating a website, the placement of images, text and other items, such as drop-down menus, is very important to the functionality of your website. If you have a website layout that requires your drop-down menu of links to be centered in the middle of the page, you can center the object by making a quick edit to your existing HTML page. To edit the page, you must be relatively familiar with HTML coding and know where in the document you have placed the code for the drop-down menu.
Instructions
-
-
1
Open your HTML document in an editor, such as notepad, or an HTML program such as Dreamweaver.
-
2
Locate the drop-down menu in the "<BODY>" section of your code. If you are using a CSS (cascading style sheet) drop-down menu code, there will be two areas of code in your HTML page. The first section of code is located in the CSS portion of the code, and the second section of code is in the body of your HTML. The body section is the part that you will need to locate to center your menu.
-
-
3
Type in "<center>" (without the quotes) right before the HTML code that designates the drop-down menu.
-
4
Scroll down until you locate the "</>" tag that signifies the end of the drop-down menu code. Type in "</center>" (without quotes) to prevent other items from centering besides the drop-down menu.
-
5
Save the HTML document and upload it to your website to check and make sure the drop-down menu is now centered.
-
1