Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Ken Adams
April 25, 2005, 3:26 pm
rate this thread
able to change the text color and size and all that, but for some reason I
can't center it. I have the following.
document.write('<span id="tP" class="clock">+eval(oT)+'</span>');
with the following css
font-family: 'Times New Roman';
Re: How to center a span element using external css?
text-align centers the text within the span. As the span is only as
wide as the text it contains, centering that text has no effect.
To center the span you need to apply text-align: center; to whatever
block level element is the span's parent.