Javescript - Can't add spaces/tabs to indent/center line on page
by pizzipie from LinuxQuestions.org on (#5MBD4)
Using Ubuntu 20.04
I am trying to indent a line to center it on the page. I am using document.write() to do this:
Code:<script type="text/javascript" >
document.write("      Referred By: "+document.referrer);
document.write(" This file: "+document.location);
document.write(" Last Modified: "+"<?php echo $lastModifiedDatetime; ?>");
document.write(" <hr style='width:80%;' </style>");
</script>All these  's and 's don't do anything after about a few spaces. I've tried * and it is no different. As you can see on the screenshot the line beginning with "Referred By:" Should be further to the right by more than a few spaces.
I sure everyone wonders why the Javascript coders haven't written a function to do this.
Totally frustrated, R
Attached Thumbnails
I am trying to indent a line to center it on the page. I am using document.write() to do this:
Code:<script type="text/javascript" >
document.write("      Referred By: "+document.referrer);
document.write(" This file: "+document.location);
document.write(" Last Modified: "+"<?php echo $lastModifiedDatetime; ?>");
document.write(" <hr style='width:80%;' </style>");
</script>All these  's and 's don't do anything after about a few spaces. I've tried * and it is no different. As you can see on the screenshot the line beginning with "Referred By:" Should be further to the right by more than a few spaces.
I sure everyone wonders why the Javascript coders haven't written a function to do this.
Totally frustrated, R
Attached Thumbnails