View Full Version : Why won't my menu bar and logo center? Could someone take a look at my code?

11-21-2012, 04:09 AM
I have followed directions I found for centering my spry menu bar and company logo.

I tried creating a class with modified CSS for a div then I wrapped each of the items in the div and applied the class to each div.

11-21-2012, 04:41 AM
just post your code and wrap it in code tags

11-21-2012, 04:21 PM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.Menuandlogo {
margin-right: auto;
margin-left: auto;
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<body class="MenuBarActive">
<img src="../4kids/logo 600.jpg" alt="Therapy 4 Kids" width="600" height="171" align="top" />
<div class="Menuandlogo">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a href="#">Home</a></li>
<li><a href="#">Our Services</a></li>
<li><a class="MenuBarItemSubmenu" href="#">Can My Child Benefit</a>
<li><a class="MenuBarItemSubmenu" href="#">Item 3.1</a>
<li><a href="#">Item 3.1.1</a></li>
<li><a href="#">Item 3.1.2</a></li>
<li><a href="#">Item 3.2</a></li>
<li><a href="#">Item 3.3</a></li>
<li><a href="#">Resources</a></li>
<li><a href="#">Meet the Owners</a></li>
<li><a href="#">Contact Us</a></li>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});

11-22-2012, 12:57 AM
the clalss that you created?

11-22-2012, 05:19 PM
Sorry Im new at this.


i noticed in the code there is a . before the class, I tried removeing it.it did not matter.

Thanks so much.