PDA

View Full Version : Script needs to be centralised.



theremotedr
07-19-2013, 03:10 PM
I am using a script taken from this site & shown by the link below.

http://www.dynamicdrive.com/dynamicindex10/neontext.htm

When the script runs on my page the text is shown to the left.
Please can you advise a line of text etc so i can run the script central to the page.
Many thanks.

Beverleyh
07-19-2013, 03:28 PM
Should be easily achieveable with CSS rather than any additional script. It's a very old one so I wouldn't recommend using it 'as-is' - at least update the deprecated font tags to spans with an inline-style. Anyway, its untested, but this should do it;

h2{text-align:center;}

If you need more help, please provide a link to your page.

theremotedr
07-19-2013, 04:15 PM
Ha Ha im a newbie so easily achieveable is miles away yet.
Here is a link to the page if you could advise where i need to put the code you knidly advised.

http://www.ianparsons.info/ztestpage.htm

jscheuer1
07-19-2013, 04:20 PM
Where you have:


<p align="center"><b><font size="5" face="Arial Black">Example BMW 1, HONDA 2, Etc Etc</font></b></p>
<u><b><font face="Arial Black" size="6" color="#0000FF"><h2>
<script language="JavaScript1.2">

/*
Neon Lights Text
By JavaScript Kit (http://javascriptkit.com)
For this script, TOS, and 100s more . . .

Make that:


<p align="center"><b><font size="5" face="Arial Black">Example BMW 1, HONDA 2, Etc Etc</font></b></p>
<u><b><font face="Arial Black" size="6" color="#0000FF"><h2 style="text-align: center;">
<script language="JavaScript1.2">

/*
Neon Lights Text
By JavaScript Kit (http://javascriptkit.com)
For this script, TOS, and 100s more . . .

Beverleyh
07-19-2013, 04:21 PM
The easiest way would be to look for the <h2> tag that is right in front of that Neon Lights JavaScript, and change it to this;
<h2 style="text-align:center">

theremotedr
07-19-2013, 04:24 PM
I have now done that.
Just need a pointer for text size code please

Beverleyh
07-19-2013, 04:26 PM
Are you wanting to change the size of that h2 font?

If so you could just do;
<h2 style="text-align:center; font-size:12pt;">

Note the semi-colon seperators, and you can change the font-size value up or down depending on how big/small you need text to be.

theremotedr
07-19-2013, 04:30 PM
Now sorted.
Many thanks for that.