Text Alignment Issue

Category: AJAX Questions    |    2 views
Hi all,

I need directions on "Text Alignment"

I have used this code to greet user:

<script type="text/javascript">
var d = new Date();
var time = d.getHours();
if (time > 17) 
{
document.write("<b>Good Evening, Thanks For Visiting Us!</b>");
}
else if (time <17 && time >12)
{
document.write("<b>Good Afternoon, Thanks For Visiting Us!</b>");
}
else
{
document.write("<b>Good Morning, Thanks For Visiting Us!</b>");
}
</script>

Its working fine for me, but the problem is

This code writes "Greeting Message" in the left side of the page & i want the Message

To be displayed in the Center(middle) of the page.

What else should i add to the existing code to get it work.

Thanks all.

Share/Save/Bookmark

1 Star2 Stars
Loading ... Loading ...

0 responses so far!

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word