PDA

View Full Version : 'space' in javascript menu



Mozie
06-25-2007, 11:30 AM
I'm using a javascript menu and don't know how to add a 'space' after the menu title:


Menu1=new Array("Home Page","http://whatever","images/whatever.jpg",0,30,170);

After the titled "Home Page" (which is the button name) I need to add a space as it's too close to the edge of the button graphic. I've tried &nbsp and %20 as these are the only ones I know. Can anyone tell me how to do this, is there a symbol I can use?

Thanks

killerchutney
06-25-2007, 02:48 PM
erm...


 

Is the only one I know, did you forget the semi-colon?

The only other way I can think of is a spacer graphic, not the best solution I know but it should work. You can just make a 1x1px transparent graphic and just stretch it (<img src="blah" width="whatever">)

alexjewell
06-25-2007, 03:08 PM
Or you could give the button graphic a class and in the css, give that class a left margin of say, 10px or so. Play around with it.

jscheuer1
06-25-2007, 04:16 PM
You could also try:

\xa0

Mozie
06-26-2007, 06:33 AM
You could also try:

\xa0

Brilliant, \xa0 works :D Thanks John;) And everyone else for input :)