Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Marquee loop question

  1. #1
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default Marquee loop question

    Hi,
    Here is the page in question,
    http://www.theremotedoctor.co.uk/index.html

    Here is the code used,
    <marquee width="100%" bgcolor="#93D3F1"><font size="5" color="#000000" face="Arial, Helvetica">*** New Honda Flip Upgrade & Key cloning Call <a href="tel:07899-827427">07899-827427</a> ***</font></marquee>

    What I've noticed is when viewing on a phone the text is shown on say 3 lines.
    I would like it to just scroll the text in one line & once the last letter has disappeared off the left hand side then start again leading in from the right.
    I believe the reason is due to the width but unsure how to overcome this part.

  2. #2
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    Hi there theremotedr,

    come on squire...

    "You can't have your cake and eat it"

    If you choose to use twentieth century propriety and obsolete code,
    then you really should be extremely grateful to find that it actually
    works in any modern phone device.

    Having said that, you could try this CSS....

    Code:
    
    marquee {
        white-space: nowrap;
     }
    ...but don't hold your breath.

    coothead
    ~ the original bald headed old fart ~

  3. The Following User Says Thank You to coothead For This Useful Post:

    theremotedr (11-15-2016)

  4. #3
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Hi,
    CSS was an option & still is but as I started to run into problems & didn't want to ask I got this working in no time.
    I'm still thinking of CSS but looking for a post etc of where to start and achieve the same thing.
    This was a Sunday afternoon time filler but I'm looking as we speak.

  5. #4
    Join Date
    Jan 2009
    Location
    NH
    Posts
    675
    Thanks
    98
    Thanked 26 Times in 26 Posts

    Default

    html:
    Code:
    <p class="marquee">*** New Honda Flip Upgrade & Key cloning Call <a href="tel:07899-827427">07899-827427</a> ***</p>
    css:
    Code:
    .marquee {
          width: 100%;
          margin: 0 auto;
          overflow: hidden;
          white-space: nowrap;
          font-size: 20px;
          position: absolute;
          color: #000;
          font-family: Arial, Helvetica;
          -webkit-animation: marquee 5s linear infinite;
        }
    
        @-webkit-keyframes marquee {
          0% {
            text-indent: 260px;
          }
          100% {
            text-indent: -260px;
          }
        }

  6. The Following User Says Thank You to mlegg For This Useful Post:

    theremotedr (11-15-2016)

  7. #5
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Morning,
    I thought i would apply Mlegg code to see how it would look.
    I dont see it scroll ?

  8. #6
    Join Date
    Jan 2009
    Location
    NH
    Posts
    675
    Thanks
    98
    Thanked 26 Times in 26 Posts

    Default

    look at it working here https://jsfiddle.net/nkfdz1a0/

  9. The Following User Says Thank You to mlegg For This Useful Post:

    theremotedr (11-15-2016)

  10. #7
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Hi,
    That's strange,please take a look here http://theremotedoctor.co.uk
    Ive copied your text again and placed it as follows.

    HTML code has been placed where i want the marquee to scroll on the page.
    CSS code has been placed in the basic-style.css file.

    Ive checked it in Chrome & Firefox but its just staic without the scroll.

    I see your fiddle and it works like you say.

  11. #8
    Join Date
    Jan 2009
    Location
    NH
    Posts
    675
    Thanks
    98
    Thanked 26 Times in 26 Posts

    Default

    Fix your html errors and upload the page again. You've been doing this website long enough that you should know to check for code errors. Here are a few pages to start with
    https://validator.w3.org/nu/
    https://jigsaw.w3.org/css-validator/


    Error: Stray end tag script. From line 13, column 1; to line 13, column 9 head>↩↩↩↩↩</script>↩

    No p element in scope but a p end tag seen. From line 215, column 11; to line 215, column 14 </p>↩

    Error: The hspace attribute on the img element is obsolete. Use CSS instead for lines line 324, column 29; to line 324, column 144: 99827427"><img src="m-images/phone-icon.png" hspace="3" alt="phone the remote doctor" width="53" height="53" class="shadow" /></a>↩↩
    and all the image lines below that

    Error: The language attribute on the script element is obsolete. Use the type attribute instead.
    From line 348, column 1; to line 348, column 33: ↩ <h2>↩<script language="JavaScript1.2">↩↩/*↩N

  12. The Following User Says Thank You to mlegg For This Useful Post:

    theremotedr (11-15-2016)

  13. #9
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Ive done what i can but still does not scroll.
    Taking a look i dont see why so putting it to one side as it taking up too much time for me to see the problem.

    Thanks anyway

  14. #10
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    And the fact that you've put the css-marquee CSS inside a print media query doesn't jump out as being problematic to you?
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

Similar Threads

  1. Replies: 0
    Last Post: 05-06-2011, 07:30 AM
  2. adding loop pause / delay to Cross Browser marquee II
    By mannkumar in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 07-20-2010, 09:13 AM
  3. Replies: 3
    Last Post: 04-26-2009, 03:10 AM
  4. loop question?
    By Rino5555 in forum ASP
    Replies: 8
    Last Post: 05-17-2008, 10:20 AM
  5. while() loop question...
    By SessTehKing in forum PHP
    Replies: 1
    Last Post: 05-11-2007, 10:47 PM

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
  •