Solved Changing Code's Output Text

July 13, 2013 at 14:25:45
Specs: Macintosh

I am currently designing a website using an online editor ( After some searching, I found a code that creates an automatically updating copyright footer using Javascript and Wix's built in HTML editor. The code I found, however, outputs black text, which does not show on my black background. Also, the size is slightly larger than I would like it to be.

What I need is a code that will allow me to take the copyright footer code:

Copyright © <script language="JavaScript" type="text/javascript">document.write((new Date()).getFullYear());</script> websitenotyetfinished. All rights reserved.</p>

and allow me to change the output by putting in a color code (e.g. 00ff88) and a text size. Word of warning: I have absolutely no experience with Javascript, so please keep answers as simple as possible.

Thanks in advance!
Daniel F.

See More: Changing Codes Output Text

Report •

July 13, 2013 at 19:28:23
✔ Best Answer
The JavaScript is fine. All you need to do is nest that code in a block or inline element like Div, P, Span, and then use CSS to apply the changes to color and size. You have the end paragraph tag already, so it depends on where that paragraph tag starts. That closing tag may be in the wrong place. In which case, move it to it's proper place, then nest your code there into a new tag.

The CSS attributes you add are color:#00ff88 and font-size:90% or whatever size you desire.

If you post the whole code of your webpage, I can help clean it up some. As it stands now, without knowing 1.) which document type the HTML file is, 2.) whether you're using external, internal, or prefer in-line styles, and 3.) the code above and around that which you supplied, your code can be changed to this:
<p style="color:#00ff88; font-size:90%">Copyright &copy; <script type="text/javascript">document.write((new Date()).getFullYear());</script> websitenotyetfinished. All rights reserved.</p>

Apologies if I don't respond to your reply immediately. I don't check this site daily, but you're welcome to PM me as a reminder.

Report •

July 13, 2013 at 19:40:09
Thank you very much, it worked perfectly!

Report •

Related Solutions

Ask Question