PDA

View Full Version : How can I center a scrolling text box on my page?



estesr
09-24-2008, 01:25 PM
I'm sure this is a simple question; but I'm trying to use a java scripted scrolling text box on my page but it keeps defaulting to the left of the page. How can I center it? Thanks.

Randy

rangana
09-25-2008, 01:58 AM
Do you have a link to the script you were describing? It would help.

Also note that JAVA is different from Javascript.

magicyte
09-27-2008, 01:46 AM
To center things in HTML, use the <center> tag. That is all I could tell you, considering you didn't provide a link to your code, nor did you provide it. Please, do what rangana asked and give us your code.

-magicyte

rangana
09-27-2008, 02:45 AM
To center things in HTML, use the <center> tag.

-magicyte

center tag is deprecated and should'nt be advocated (http://www.codehelp.co.uk/html/deprecated.html).

magicyte
09-27-2008, 02:47 AM
WHOOPS!! I hadn't known that the <center> tag was deprecated...

Sorry! Instead, use align="center";

or in the style attribute : text-align:center; - forgot that one

-magicyte

rangana
09-27-2008, 02:58 AM
It looks like you haven't taken the time to read the link I've provided on the deprecated tags and attributes.

align is a deprecated attribute too (http://www.codehelp.co.uk/html/deprecated.html) (on some elements).

TheJoshMan
09-27-2008, 03:00 AM
you could however get around this by using a container which is set to "text-align:center;"

Then placing your srolling div inside it with "text-align:left;"

magicyte
09-27-2008, 03:04 AM
By the way, how do you get those yellow divs to hold that stuff? Does it come free with being a Senior Coder?

-magicyte

TheJoshMan
09-27-2008, 03:05 AM
aye sir, aye