Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2012
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Marquee tag has delayed start?

    Hi, I''m trying to create a downward scrolling marquee that starts straight away (without using javascript) and for some reason I'm getting a delay before it begins. I've tried adding a scrolldelay but it's not really working.
    Anyone know why?

    CSS
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>
    <style type="text/css">
    body {
        height: 600px;
        width: 1024px;}
    #wrapper {
        height: 600px;
        width: 1024px;}
    .marquee {
        min-height: 600px; 
        position: absolute;
        font-family: Garamond;
        font-size: 8pt;
        color: #FF00CC;}
    </style>
    HTML
    Code:
    <body>
    <div id="wrapper">
    <marquee class="marquee" direction="down" scrollamount="10">scroll down</marquee>
    </div>
    </body>
    </html>

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello rizzledon,
    That snippet of code you've posted is invalid. By closing your head to early you have placed your CSS in between the head and body of the document and who knows how that's going to work?

    See the links about validation in my signature line below.

    Some help with marquee - http://www.hongkiat.com/blog/css-marquee/
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,618
    Thanks
    0
    Thanked 645 Times in 635 Posts
    Also there's no such thing as a marquee tag in HTML because HTML defines the content and JavaScript defines the behaviour and marquee is a behaviour. Some browsers do have a proprietary tag called marquee but a single line of CSS in the user CSS file or inserted into the browser's own default CSS soon negates that.

    To implement any marquee properly you should use JavaScript. When you implement a marquee this way you can then control exactly how you want it to work.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Tags for this Thread

    Posting Permissions

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