PDA

View Full Version : All Levels Nav Menu 2.2 - simple CSS question



ArchibaldBarashol
06-29-2009, 07:19 PM
1) Script Title: All Levels Navigational Menu (v2.2)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/index.htm

3) Describe problem:

Simple one here. In ddlevelsmenu-topbar.css, I adjusted the size of the menu boxes to 105 x 42, as shown in the code below. Now the text is top-left and the drop down boxes are several pixels below the menu.

How can I center the text (both horizontally and vertically) and move up the drop boxes?

Thanks,
Arch

Menu is at: www.skolnyfamily.org/demo.htm

Adjusted css:


.mattblackmenu li a{
float: left;
display: block;
vertical-align: center;
text-decoration: none;
top-margin: 12;
padding: 6px 8px; /*padding inside each tab*/
border-right: 1px solid white; /*right divider between tabs*/
color: white;
background: #000000;
width: 105px;
height: 42px;
}

ddadmin
06-30-2009, 05:31 AM
Centering the anchor text horizontally is easy enough:


.mattblackmenu li a{
float: left;
display: block;
text-decoration: none;
padding: 0px 0px; /*padding inside each tab*/
border-right: 1px solid white; /*right divider between tabs*/
color: white;
background: #000000;
width: 105px;
height:42px;
text-align: center;
}

Vertically is a different story though. You may want to do a Google search on this. Also, can you elaborate on the below?


and move up the drop boxes?