Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Aligning text in a spry vertical menu help!
Old 02-16-2010, 07:22 AM Aligning text in a spry vertical menu help!
Novice Talker

Posts: 6
Name: Chris
Trades: 0
hi there,
I'm just having a little bit of an issue with getting the text to align properly on a Spry Vertical Menu. I made some buttons for the background and have them aligned as I want them but I can't seem to get the text to align in the middle of the buttons. It's just sitting at the top of the buttons. I've tried a few things and had a play around but to no avail.
Any hellp is much appreciated.
Cheers
Aitchi
Aitchi is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-16-2010, 02:55 PM Re: Aligning text in a spry vertical menu help!
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Are we supposed to GUESS at your code?? Lets have a URL or post the code please.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 02-16-2010, 09:48 PM Re: Aligning text in a spry vertical menu help!
Novice Talker

Posts: 6
Name: Chris
Trades: 0
ok sorry... I'm new here.

the code is

Code:
@charset "UTF-8";

/* SpryMenuBarVertical.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, a fixed width box with no margin or padding */
ul.MenuBarVertical
{
	list-style-type: none;
	font-size: 100%;
	cursor: default;
	width: 8em;
	font-weight: bold;
	color: #000;
	text-decoration: none;
	margin: 0px;
	height: 30px;
	padding: 0px;
}
/* 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 same fixed width as parent */
ul.MenuBarVertical li
{
	margin: 0;
	padding: 0;
	list-style-type: none;
	font-size: 100%;
	position: relative;
	text-align: left;
	cursor: pointer;
	width: 8em;
}
/* Submenus should appear slightly overlapping to the right (95%) and up (-5%) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
ul.MenuBarVertical ul
{
	margin: -5% 0 0 95%;
	padding: 0;
	list-style-type: none;
	font-size: 100%;
	z-index: 1020;
	cursor: default;
	width: 8.2em;
	left: -1000em;
	top: 0;
	height: 30px;
}
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
ul.MenuBarVertical ul.MenuBarSubmenuVisible
{
	left: 0;
}
/* Menu item containers are same fixed width as parent */
ul.MenuBarVertical ul li
{
	width: 8.2em;
}

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

 DESIGN INFORMATION: describes color scheme, borders, fonts

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

/* Outermost menu container has borders on all sides */
ul.MenuBarVertical
{

}
/* Submenu containers have borders on all sides */
ul.MenuBarVertical ul
{
}
/* Menu items are a light gray block with padding and no text decoration */
ul.MenuBarVertical a
{
	cursor: pointer;
	color: #000;
	text-decoration: none;
	background-image: url(../orangebutton.png);
	height: 30px;
	left: 0px;
	right: 0px;
	bottom: 0px;
	width: 10em;
	top: 0px;
	padding-right: 12px;
	padding-bottom: 0px;
	padding-left: 12px;
	font-weight: bold;
	padding-top: 3px;
	background-repeat: no-repeat;
	display: block;
	margin: 0px;
}
/* Menu items that have mouse over or focus have a blue background and white text */
ul.MenuBarVertical a:hover, ul.MenuBarVertical a:focus
{
	color: #FFF;
	background-image: url(../orangebuttonRO.png);
	background-repeat: no-repeat;	
}
/* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
ul.MenuBarVertical a.MenuBarItemHover, ul.MenuBarVertical a.MenuBarItemSubmenuHover, ul.MenuBarVertical a.MenuBarSubmenuVisible
{
	color: #FFF;
	background-image: url(../orangebuttonRO.png);	
}

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

 SUBMENU INDICATION: styles if there is a submenu under a given menu item

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

/* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarVertical a.MenuBarItemSubmenu
{
	background-image: url(../orangebutton.png);
	background-repeat: no-repeat;
}

/* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarVertical a.MenuBarItemSubmenuHover
{
	background-image: url(../orangebuttonRO.png);
	background-repeat: no-repeat;	
}

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

 BROWSER HACKS: the hacks below should not be changed unless you are an expert

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

/* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
ul.MenuBarVertical iframe
{
	position: absolute;
	z-index: 1010;
	filter:alpha(opacity:0.1);
}
/* 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.MenuBarVertical li.MenuBarItemIE
	{
		display: inline;
		f\loat: left;
		background: #FFF;
	}
}
and the site is thalab.com.au
Aitchi is offline
Reply With Quote
View Public Profile
 
Old 02-17-2010, 04:02 AM Re: Aligning text in a spry vertical menu help!
Super Talker

Posts: 142
Name: William
Trades: 0
how would
li {
text-align:center;
}
work?

another thing you could try is in your html

HTML Code:
<div id="navigation">
   <ul id="MenuBar1" class="MenuBarVertical">
     <li><a href="index.php">HOME</a></li>
     <li><a href="services.php">SERVICES</a></li>
     <li><a href="contactus.php">CONTACT US</a></li>
        <li><a href="employment.php">EMPLOYMENT</a></li>
you could try making it:
HTML Code:
<div id="navigation">
<center>
   <ul id="MenuBar1" class="MenuBarVertical">
     <li><a href="index.php">HOME</a></li>
     <li><a href="services.php">SERVICES</a></li>
     <li><a href="contactus.php">CONTACT US</a></li>
        <li><a href="employment.php">EMPLOYMENT</a></li>
</center>
Looking through your code I noticed this:

PHP Code:
/* Menu item containers, position children relative to this container and are same fixed width as parent */
ul.MenuBarVertical li
{
    
margin0;
    
padding0;
    list-
style-typenone;
    
font-size100%;
    
positionrelative;
    
text-alignleft/*<<<< change that to center*/
    
cursorpointer;
    
width8em;


Last edited by UUilliam; 02-17-2010 at 04:07 AM..
UUilliam is offline
Reply With Quote
View Public Profile
 
Old 02-17-2010, 04:33 AM Re: Aligning text in a spry vertical menu help!
Novice Talker

Posts: 6
Name: Chris
Trades: 0
ok well i tried all of that and it didn't work but i'm not sure if you understood the problem properly. As you'll notice on the page thalab.com.au the text on the menu sits at the top of the buttons.. i want to center the text in the middle of the buttons.
Aitchi is offline
Reply With Quote
View Public Profile
 
Old 02-17-2010, 04:57 AM Re: Aligning text in a spry vertical menu help!
Super Talker

Posts: 142
Name: William
Trades: 0
I would try
margin-top:5px;

in whichever class contaqins your text (according to you html it would be
.MenuBarVertical #MenuBar1

but I cannot see that when looking at your code.

I am like really new to this too, but I suppose, every little helps, I am sure ladynred will reply with an answer.

maybe this will help:
http://www.webmaster-talk.com/css-fo...r-website.html
UUilliam is offline
Reply With Quote
View Public Profile
 
Old 02-17-2010, 07:55 AM Re: Aligning text in a spry vertical menu help!
Novice Talker

Posts: 6
Name: Chris
Trades: 0
when you adjust the margins and the the padding it moves the entire group of buttons down. I just want to adjust where the text is sitting.
Aitchi is offline
Reply With Quote
View Public Profile
 
Old 02-17-2010, 11:17 PM Re: Aligning text in a spry vertical menu help!
Novice Talker

Posts: 6
Name: Chris
Trades: 0
ok so really, out of the 95 people who have viewed this board is there no one that can help me?
Aitchi is offline
Reply With Quote
View Public Profile
 
Old 02-19-2010, 03:08 AM Re: Aligning text in a spry vertical menu help!
Novice Talker

Posts: 6
Name: Chris
Trades: 0
ok well i think i have tried eveything i can possibly try to change the placement of the text... Nothing seems to work... PLEASE HELPPPP ME!!!!!
Aitchi is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Aligning text in a spry vertical menu help!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.53458 seconds with 12 queries