From: Doug M. <do...@cr...> - 2004-03-18 18:14:56
|
use a table for text allignment. > ----- Original Message ----- > From: "António Godinho" <to...@ma...> > To: <dyn...@li...> > Sent: Thursday, March 18, 2004 4:40 AM > Subject: RE: [Dynapi-Help] SetClass > > > > It seams like I wasn't able to ask what I wanted. And since I'm sending > > this email I'll ask other thing a bit more code releated below. > > > > 1. I'm doing a onmouse event. I want to change the bg and border color > > and resize the layer. The problem is with the text. I wasn't able to > > center the text on the layer, TEXT-ALIGN: center; works great with the > > horizontal but VERTICAL-ALIGN: middle; doesn't work with the vertical. > > I've been trying several options but none seam to work. > > > > Here's part of my CSS: > > > > .cssmenuoff > > { > > BACKGROUND-COLOR: #F0F0F0; > > BORDER-BOTTOM: #B3B0B0 1px solid; > > BORDER-LEFT: #B3B0B0 1px solid; > > BORDER-RIGHT: #B3B0B0 1px solid; > > BORDER-TOP: #B3B0B0 1px solid; > > FONT-FAMILY: Tahoma,Verdana,Helvetica; > > FONT-SIZE: 12px; > > COLOR: #000000; > > TEXT-ALIGN: center; > > VERTICAL-ALIGN: middle; > > azimuth: center; > > } > > .cssmenuon > > { > > BACKGROUND-COLOR: #B3B0B0; > > BORDER-BOTTOM: #F0F0F0 1px solid; > > BORDER-LEFT: #F0F0F0 1px solid; > > BORDER-RIGHT: #F0F0F0 1px solid; > > BORDER-TOP: #F0F0F0 1px solid; > > FONT-FAMILY: Tahoma,Verdana,Helvetica; > > FONT-SIZE: 12px; > > COLOR: #FFFFFF; > > TEXT-ALIGN: center; > > azimuth: center; > > VERTICAL-ALIGN: middle; > > } > > > > > > 2. I'll have several layers like this: > > > > var botao8 = principal.addChild(new > > DynLayer(null,19,310,112,25,null,true,2)); > > botao8.setClass ('cssmenu'); > > botao8.setHTML('links'); > > botao8.name = "botao8"; > > objStacker.add(botao8); > > > > The only dif is the name and the html. I can save the html on a small > > matrix outside, for example options[]. Since the name of my layers are > > botaoX, where X is a number how can I define this with s for cicle ( > > I'll do everything in one time )? > > for (var i=0;i<9;i++){ > > > > var botao[i] = principal.addChild(new > > DynLayer(null,19,310,112,25,null,true,2)); > > botao[i].setClass ('cssmenu'); > > botao[i].setHTML(options[i]); > > botao[i].name = "botao"+[i]; > > objStacker.add(botao[i]); > > > > var el = { > > onmouseover : function(e) { > > botao[i].setClass ('cssmenu2'); > > }, > > onmouseout : function(e) { > > botao[i].setClass ('cssmenu'); > > }, > > onclick : function(e) { > > alert ('click!'); > > } > > }; > > botao[i].addEventListener(el); > > > > } > > > > Basicaly I just changed botaoX, where X was the number os my layers, > > I just keep incrising the number for each one I wanted to create. But if > > this way was possible it will simplify things. > > > > Thanx, > > > > António Godinho > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > GenToo technologies. Learn everything from fundamentals to system > > administration.http://ads.osdn.com/?ad_id70&alloc_id638&opÌk > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > |