Results 1 to 9 of 9

Thread: How can I center a scrolling text box on my page?

  1. #1
    Join Date
    Sep 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How can I center a scrolling text box on my page?

    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

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Do you have a link to the script you were describing? It would help.

    Also note that JAVA is different from Javascript.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    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

  4. #4
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Quote Originally Posted by magicyte View Post
    To center things in HTML, use the <center> tag.

    -magicyte
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  5. #5
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    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
    Last edited by magicyte; 09-27-2008 at 03:03 AM. Reason: FORGOT SOMETHING

  6. #6
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    It looks like you haven't taken the time to read the link I've provided on the deprecated tags and attributes.

    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  7. #7
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    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;"
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  8. #8
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    By the way, how do you get those yellow divs to hold that stuff? Does it come free with being a Senior Coder?

    -magicyte

  9. #9
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    aye sir, aye
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •