Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE DREAMWEAVER: HomeDreamweaver ForumDreamweaver TutorialsFAQAdobe FlashWeb Design

Centering a horizontal spy menu bar

Cow Forums : Adobe Dreamweaver
FAQ   •   VIEW POSTS   •   ADD A NEW POST   •   SEARCH   •   CHANGE FORUM
Respond to this post   •   Return to posts index   •   Read entire thread


Centering a horizontal spy menu bar
by Lee Margolies on Nov 5, 2009 at 9:34:32 pm

I'm trying to center a horizontal spy menu bar on a page. For some reason IE, FF and Safari are all left justifying the menu and if I don't have a padding property (see below) in the ul.MenuBarHorizontal it shifts the entire bar about 20 pixels to the right.

Any help you can offer is appreciated...
Thanx,
lm

Site Address: http://www.capitologic.com/TEST/index.html

SpryMenuBarHorizontal.css:

@charset "UTF-8";

/* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */

/* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */

/*******************************************************************************

LAYOUT INFORMATION: describes box model, positioning, z-order

*******************************************************************************/

/* The outermost container of the Menu Bar, an auto width box with no margin or padding */
ul.MenuBarHorizontal
{
margin: 0;
padding: 0;
width: 666px;
}
/* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
ul.MenuBarActive
{
z-index: 1000;
}
/* Menu item containers, position children relative to this container and are a fixed width */
ul.MenuBarHorizontal li
{
list-style-type: none;
font-size: 100%;
position: relative;
line-height: -15;
cursor: pointer;
width: 133.2px;
float: left;
}
/* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
ul.MenuBarHorizontal ul
{
margin: 0;
padding: 0;
list-style-type: none;
font-size: 100%;
z-index: 1020;
cursor: default;
left: -1000em;
width: 160px;
position: absolute;
background-color: #005dab;
color: #fff;
}
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
{
left: auto;

}
/* Menu item containers are same fixed width as parent */
ul.MenuBarHorizontal ul li
{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: normal;
width: 160px;
border-width: 1px 2px 1px 2px;
border-style: solid;
border-color: #005dab;
background-color: transparent;
float: none;
margin: 0 0 0 -1.5%;

}

/* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
{
left: auto;
top: 0;
}

/*******************************************************************************

DESIGN INFORMATION: describes color scheme, borders, fonts

*******************************************************************************/


/* Menu items are a light gray block with padding and no text decoration */
ul.MenuBarHorizontal a
{
display: block;
cursor: pointer;
background-color: #FFF;
padding: 0.5em 0.75em;
color: #005dab;
text-decoration: none;
text-align: center;
}
/* Menu items that have mouse over or focus have a blue background and white text */
ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
{
background-color: #005dab;
color: #FFF;
}
ul.MenuBarHorizontal ul a {
text-align: left;
}
/* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
{

text-decoration: none
}
/* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
@media screen, projection
{
ul.MenuBarHorizontal li.MenuBarItemIE
{
display: inline;
f\loat: left;
}
}

************************************************************************************

main.css:

@charset "UTF-8";

/*Top, Right, Bottom, Left*/

h1 {
font-size: 14px;
color: #000;
}
h2 {
font-size: 13px;
color: #000;
}
body {
font-family: Arial, Helvetica, sans-serif;
background-repeat: repeat;
background-image: url(../images/bkgdIMAGE.png);
margin: 0;
padding: 0;
position: relative;
text-align: center;
}
#wrapper {
background-color: #FFF;
width: 1004px;
font-family: Arial, Helvetica, sans-serif;
text-align: left;
color: #FFF;
margin-left: auto;
margin-right: auto;
}

#sidebarLeft {
font-family: Arial, Helvetica, sans-serif;
margin: 0px;
float: left;
padding: 0px;
height: 608px;
width: 160px;
border: 3px solid #038;
}

#sidebarRight {
background-color: #FFF;
margin: 0px;
padding: 0px;
height: 608px;
width: 160px;
float: left;
font-family: Arial, Helvetica, sans-serif;
color: #FFF;
border: 3px solid #038;
}

#mainBody {
font-family: Arial, Helvetica, sans-serif;
color: #FFF;
background-color: #FFF;
padding: 0px;
height: 608px;
width: 672px;
float: left;
margin-right: auto;
margin-left: auto;
border-top-width: 3px;
border-bottom-width: 3px;
border-top-style: solid;
border-bottom-style: solid;
border-top-color: #038;
border-bottom-color: #038;
position: relative;
}
#header {
font-family: Arial, Helvetica, sans-serif;
color: #FFF;
margin-right: auto;
margin-left: auto;
height: 99px;
width: 666px;
border-top-width: 3px;
border-right-width: 2px;
border-bottom-width: 2px;
border-left-width: 2px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: none;
border-left-style: solid;
border-top-color: #EEE;
border-right-color: #EEE;
border-bottom-color: #EEE;
border-left-color: #EEE;
}
#navbar {
background-color: #005dab;
width: 662px;
margin-right: auto;
margin-left: auto;
margin-bottom: 0px;
border-right-width: 2px;
border-left-width: 2px;
border-bottom-width: 2px;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-right-color: #005dab;
border-bottom-color: #005dab;
border-left-color: #005dab;
height: 30px;
position: relative;


}
/* ---------------- header specific styles ----------------*/

#navbar li a:link, #navbar li a:visited {
display: block;
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
font-weight: bold;
color: #005dab;
text-decoration: none;
line-height: 24px;
margin-right: 2px;
margin-left: 0%;
padding: .2em .5em;
}
#navbar li a.current, #navbar li a.current:hover, #navbar li a.current:active {
color: #FFF;
cursor: default;
background-color: #005dab;
}
#navbar li a:hover, #navbar li a:active {
color: #FFF;
background: #005dab;
}
#navbar li ul a:link, #navbar li ul a:visited {
font-size: 13px;
font-weight: normal;
margin-left: auto;
margin-right: auto;
padding: .2em .5em;
}

#navbar li ul a:hover, #navbar li ul a:actve{
color: #FFF;
background: #005dab;
}

#bodyText {
padding: 5px;
height: 225px;
margin-top: 5px;
margin-right: 5px;
margin-bottom: 5px;
margin-left: 5px;
}
#imagesBoxes {
background-color: #FFF;
height: 175px;
margin: 0px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;

width: inherit;
}
#sidebarRight #HeadlinesBox #TextBox {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
text-align: left;
width: 157px;
padding: 0px;
margin: 0px;
}
#imagesboxesTitle {
background-color: #FFF;
margin: 0px;
padding: 0px;
height: 20px;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #000;
text-align: center;
vertical-align: middle;
font-weight: bold;
}
#imagebox1 {
background-color: #FFF;
margin: 0px;
padding: 0px;
width: 168px;
height: 127px;
float: left;
}
#imagebox2 {
background-color: #FFF;
margin: 0px;
padding: 0px;
width: 168px;
height: 127px;
float: left;
}
#imagebox3 {
background-color: #FFF;
margin: 0px;
padding: 0px;
width: 168px;
height: 127px;
float: left;
}
#imagebox4 {
background-color: #FFF;
margin: 0px;
padding: 0px;
width: 168px;
height: 127px;
float: left;
}
#missionStatement {
background-color: #FFF;
width: 161px;
height: 74px;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #000;
text-align: center;
font-weight: bold;
display: table-cell;
line-height: 14px;
}
#headlinesBNR {
height: 28px;
width: 161px;
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: bold;
color: #FFF;
background-image: url(../images/HeadlinesBNR.jpg);
line-height: 28px;
text-align: center;
}
#HeadlinesBox {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #000;
background-color: #FFF;
text-align: center;
margin: 0px;
height: 305px;
padding: 0px;
font-weight: bold;
}
#HeadlinesFeed {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000;
text-align: left;
display: block;
width: 155px;
margin-right: auto;
margin-left: auto;
font-weight: bold;
height: 287px;
}
#RSSBNR {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
color: #FFF;
background-image: url(../images/HeadlinesBNR.jpg);
margin: 0px;
padding: 0px;
height: 28px;
width: 161px;
text-align: center;
line-height: 28px;
}
#RSSBox {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #000;
background-color: #FFF;
text-align: center;
margin: 0px;
padding: 0px;
font-weight: bold;
line-height: 97%;
}
#RSSFeed {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000;
text-align: left;
display: block
width: 155px;
margin-left: auto;
margin-right: auto;

}






Respond to this post   •   Return to posts index   •   Read entire thread


Current Message Thread:




Note: If you are a registered user please click here to login before posting.

Your post will not be accepted if your name and email address are not registered in our database. Click here if you do not have an account.

Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message   Entire Thread   None  

Message:



Note: The following are HTML characters and may cause parts of your post to disappear if not used correctly: < > &
To include any portion of the post in your response, highlight the desired text and hit the "Q" key. Read more...



Add your message signature


 


Note: By clicking "Post Direct" button above, you are agreeing to the Creative Cow's Code of Conduct.



FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]